Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changesets/fix-volatiles-again.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
release: patch
summary: The macros changes in fix/volatiles where reverted in a merge in the last release, this pr applies the changes once more to fix the undefined behaviour.
20 changes: 7 additions & 13 deletions Inc/HALAL/Models/MPU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,13 @@
#define D3_C
#define RAM_CODE
#else
/*
* Use C++ attribute syntax when compiled as C++, otherwise fall back to GCC-style
* `__attribute__` so the header is safe to include from both C and C++ translation
* units (some build units may be plain C and would reject the [[...]] syntax).
*/
#define D1_NC __attribute__((section(".mpu_ram_d1_nc.user")))
#define D2_NC __attribute__((section(".mpu_ram_d2_nc.user")))
#define D3_NC __attribute__((section(".mpu_ram_d3_nc.user")))
#define D1_C __attribute__((section(".ram_d1.user")))
#define D2_C __attribute__((section(".ram_d2.user")))
#define D3_C __attribute__((section(".ram_d3.user")))

// Define for RAM code

#define D1_NC __attribute__((section(".mpu_ram_d1_nc.user"), used)) volatile
#define D2_NC __attribute__((section(".mpu_ram_d2_nc.user"), used)) volatile
#define D3_NC __attribute__((section(".mpu_ram_d3_nc.user"), used)) volatile
#define D1_C __attribute__((section(".ram_d1.user"), used))
#define D2_C __attribute__((section(".ram_d2.user"), used))
#define D3_C __attribute__((section(".ram_d3.user"), used))
#define RAM_CODE __attribute__((section(".ram_code")))
#endif

Expand Down
Loading