Make flash libraries inclusion exclusive to NRF52

This commit is contained in:
jacob.eva 2024-01-20 10:46:38 +00:00
parent 381d40c4f5
commit 477c6d0385
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E
7 changed files with 11 additions and 11 deletions

View File

@ -77,7 +77,7 @@
#elif defined(ESP32)
#define PLATFORM PLATFORM_ESP32
#define MCU_VARIANT MCU_ESP32
#elif defined(nRF52)
#elif defined(NRF52840_XXAA)
#define PLATFORM PLATFORM_NRF52
#define MCU_VARIANT MCU_NRF52
#else

View File

@ -20,7 +20,7 @@
#elif defined(ESP32)
#define PLATFORM PLATFORM_ESP32
#define MCU_VARIANT MCU_ESP32
#elif defined(nRF52)
#elif defined(NRF52840_XXAA)
#define PLATFORM PLATFORM_NRF52
#define MCU_VARIANT MCU_NRF52
#endif

View File

@ -92,7 +92,7 @@ firmware-genericesp32:
arduino-cli compile --fqbn esp32:esp32:esp32 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x35\""
firmware-rak4630:
arduino-cli compile --fqbn rakwireless:nrf52:WisCoreRAK4631Board -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x51\" \"-DnRF52=true\" \"-DMODEM=0x03\""
arduino-cli compile --fqbn rakwireless:nrf52:WisCoreRAK4631Board -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x51\" \"-DMODEM=0x03\""
upload:
arduino-cli upload -p /dev/ttyUSB0 --fqbn unsignedio:avr:rnode

View File

@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifdef NRF52840_XXAA
#include <string.h>
#include "flash_cache.h"
#include "common_func.h"
@ -201,4 +201,4 @@ int flash_cache_read (flash_cache_t* fc, void* dst, uint32_t addr, uint32_t coun
return (int) count;
}
#endif

View File

@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifdef NRF52840_XXAA
#ifndef FLASH_CACHE_H_
#define FLASH_CACHE_H_
@ -55,4 +55,4 @@ int flash_cache_read (flash_cache_t* fc, void* dst, uint32_t addr, uint32_t coun
#endif
#endif /* FLASH_CACHE_H_ */
#endif

View File

@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifdef NRF52840_XXAA
#include "flash_nrf5x.h"
#include "flash_cache.h"
#include "nrf_sdm.h"
@ -176,4 +176,4 @@ static bool fal_verify (uint32_t addr, void const * buf, uint32_t len)
{
return 0 == memcmp((void*) addr, buf, len);
}
#endif

View File

@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifdef NRF52840_XXAA
#ifndef FLASH_NRF52_H_
#define FLASH_NRF52_H_
@ -86,4 +86,4 @@ static inline uint16_t flash_nrf5x_read32 (uint32_t src)
#endif
#endif /* FLASH_NRF52_H_ */
#endif