Make flash libraries inclusion exclusive to NRF52
This commit is contained in:
parent
381d40c4f5
commit
477c6d0385
2
Config.h
2
Config.h
|
@ -77,7 +77,7 @@
|
||||||
#elif defined(ESP32)
|
#elif defined(ESP32)
|
||||||
#define PLATFORM PLATFORM_ESP32
|
#define PLATFORM PLATFORM_ESP32
|
||||||
#define MCU_VARIANT MCU_ESP32
|
#define MCU_VARIANT MCU_ESP32
|
||||||
#elif defined(nRF52)
|
#elif defined(NRF52840_XXAA)
|
||||||
#define PLATFORM PLATFORM_NRF52
|
#define PLATFORM PLATFORM_NRF52
|
||||||
#define MCU_VARIANT MCU_NRF52
|
#define MCU_VARIANT MCU_NRF52
|
||||||
#else
|
#else
|
||||||
|
|
2
LoRa.cpp
2
LoRa.cpp
|
@ -20,7 +20,7 @@
|
||||||
#elif defined(ESP32)
|
#elif defined(ESP32)
|
||||||
#define PLATFORM PLATFORM_ESP32
|
#define PLATFORM PLATFORM_ESP32
|
||||||
#define MCU_VARIANT MCU_ESP32
|
#define MCU_VARIANT MCU_ESP32
|
||||||
#elif defined(nRF52)
|
#elif defined(NRF52840_XXAA)
|
||||||
#define PLATFORM PLATFORM_NRF52
|
#define PLATFORM PLATFORM_NRF52
|
||||||
#define MCU_VARIANT MCU_NRF52
|
#define MCU_VARIANT MCU_NRF52
|
||||||
#endif
|
#endif
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -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\""
|
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:
|
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:
|
upload:
|
||||||
arduino-cli upload -p /dev/ttyUSB0 --fqbn unsignedio:avr:rnode
|
arduino-cli upload -p /dev/ttyUSB0 --fqbn unsignedio:avr:rnode
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#ifdef NRF52840_XXAA
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "flash_cache.h"
|
#include "flash_cache.h"
|
||||||
#include "common_func.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;
|
return (int) count;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#ifdef NRF52840_XXAA
|
||||||
#ifndef FLASH_CACHE_H_
|
#ifndef FLASH_CACHE_H_
|
||||||
#define 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
|
||||||
|
|
||||||
#endif /* FLASH_CACHE_H_ */
|
#endif /* FLASH_CACHE_H_ */
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#ifdef NRF52840_XXAA
|
||||||
#include "flash_nrf5x.h"
|
#include "flash_nrf5x.h"
|
||||||
#include "flash_cache.h"
|
#include "flash_cache.h"
|
||||||
#include "nrf_sdm.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);
|
return 0 == memcmp((void*) addr, buf, len);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#ifdef NRF52840_XXAA
|
||||||
#ifndef FLASH_NRF52_H_
|
#ifndef FLASH_NRF52_H_
|
||||||
#define FLASH_NRF52_H_
|
#define FLASH_NRF52_H_
|
||||||
|
|
||||||
|
@ -86,4 +86,4 @@ static inline uint16_t flash_nrf5x_read32 (uint32_t src)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* FLASH_NRF52_H_ */
|
#endif /* FLASH_NRF52_H_ */
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue