File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 6868#endif
6969
7070#ifndef MICROBIT_DEFAULT_SCRATCH_PAGE
71- #define MICROBIT_DEFAULT_SCRATCH_PAGE ( MICROBIT_BOOTLOADER_ADDRESS - MICROBIT_CODEPAGESIZE * 4)
71+ #ifdef SOFTDEVICE_PRESENT
72+ #define MICROBIT_DEFAULT_SCRATCH_PAGE ( MICROBIT_BOOTLOADER_ADDRESS - MICROBIT_CODEPAGESIZE * 4)
73+ #else
74+ #define MICROBIT_DEFAULT_SCRATCH_PAGE ( 0x7E000 )
75+ #endif
7276#endif
7377
7478#ifndef MICROBIT_STORAGE_SCRATCH_PAGE
8791 #endif
8892#endif
8993
94+ #ifndef MICROBIT_TOP_OF_FLASH
95+ #define MICROBIT_TOP_OF_FLASH ( MICROBIT_DEFAULT_SCRATCH_PAGE )
96+ #endif
9097
9198#ifndef MICROBIT_APP_REGION_END
9299 #define MICROBIT_APP_REGION_END ( MICROBIT_DEFAULT_SCRATCH_PAGE)
Original file line number Diff line number Diff line change @@ -474,3 +474,8 @@ void microbit_dmesg_flush()
474474#endif
475475}
476476
477+ uint32_t *microbit_top_of_flash ()
478+ {
479+ return (uint32_t *) MICROBIT_TOP_OF_FLASH;
480+ }
481+
Original file line number Diff line number Diff line change @@ -316,6 +316,7 @@ namespace codal
316316}
317317
318318void microbit_dmesg_flush ();
319+ uint32_t *microbit_top_of_flash ();
319320
320321#if CONFIG_ENABLED(CODAL_USE_GLOBAL_NAMESPACE)
321322using namespace codal ;
You can’t perform that action at this time.
0 commit comments