From 66de187bc7d803271eb81a6fe58930b70ac04b76 Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Sat, 13 Jul 2019 11:30:14 +0200 Subject: Update ARM-GCC article, supply links --- _posts/2019-07-12-arm-bare-metal-flags.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to '_posts') diff --git a/_posts/2019-07-12-arm-bare-metal-flags.md b/_posts/2019-07-12-arm-bare-metal-flags.md index 7323819..91e3a53 100644 --- a/_posts/2019-07-12-arm-bare-metal-flags.md +++ b/_posts/2019-07-12-arm-bare-metal-flags.md @@ -1,6 +1,9 @@ --- title: Bare Metal ARM - Compiler flag analysis language: en +redirect_from: + - /arm-bare-1 + - /arm-gcc-1 --- So... I'm doing software development for microcontrollers at work with a commercial @@ -352,9 +355,27 @@ this makes no difference with my example, however. In short: Yes, you need to write the startup code that initializes `.bss` and copies `.data` from flash to RAM manually when doing bare-metal programming. +*Update 2019-07-13*: Adding links + +Also, supplying `-nostdlib` has the same effect as `-nostartfiles` *for this particular +example*. + +## Links + +Regarding this topic, please also read "[From zero to main(): Bare metal C][zeromain]" +on interrupt.memfault.com ([archive.org link][zeromainarch] in case website goes down). + +Another source that really made things "click" for me is +"[Bare-metal C programming on ARM][bmarm]". Although the book handles the Cortex-A +series, the section about startup code is really worth a read. +The book is also [available as PDF][bmarmpdf] (again, [archive.org link][bmarch]). [1]: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads [locm]: https://github.com/libopencm3/libopencm3 [cmsis]: https://github.com/ARM-software/CMSIS_5 [so1]: https://stackoverflow.com/a/51657692 - +[zeromain]: https://interrupt.memfault.com/blog/zero-to-main-1 +[zeromainarch]: https://web.archive.org/web/20190515111558/https://interrupt.memfault.com/blog/zero-to-main-1 +[bmarm]: https://github.com/umanovskis/baremetal-arm +[bmarmpdf]: http://umanovskis.se/files/arm-baremetal-ebook.pdf +[bmarch]: https://web.archive.org/web/20190713091239/http://umanovskis.se/files/arm-baremetal-ebook.pdf -- cgit v1.2.3