We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0eb7e7d + 535b196 commit b8727ecCopy full SHA for b8727ec
drivers/FlashIAP.h
@@ -28,6 +28,20 @@
28
#include "platform/SingletonPtr.h"
29
#include "platform/PlatformMutex.h"
30
#include "platform/NonCopyable.h"
31
+#include <algorithm>
32
+
33
+// Export ROM end address
34
+#if defined(TOOLCHAIN_GCC_ARM)
35
+extern uint32_t __etext;
36
+#define FLASHIAP_ROM_END ((uint32_t) &__etext)
37
+#elif defined(TOOLCHAIN_ARM)
38
+extern uint32_t Load$$LR$$LR_IROM1$$Limit[];
39
+#define FLASHIAP_ROM_END ((uint32_t)Load$$LR$$LR_IROM1$$Limit)
40
+#elif defined(TOOLCHAIN_IAR)
41
+#pragma section=".rodata"
42
+#pragma section=".text"
43
+#define FLASHIAP_ROM_END (std::max((uint32_t) __section_end(".rodata"), (uint32_t) __section_end(".text")))
44
+#endif
45
46
namespace mbed {
47
0 commit comments