Re: small custom bootloader to start an app stored in flash
Oleg Uzenkov <[email protected]> Thu, 23 Oct 2014 14:50:19 +0300
| Newsgroups | gmane.os.ecos.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, Please have a look to this document: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044e/IHI0044E_aaelf.pdf on page 21 it says: "Note This allows a linker to distinguish ARM and Thumb code symbols without having to refer to the map. An ARM symbol will always have an even value, while a Thumb symbol will always have an odd value. However, a linker should strip the discriminating bit from the value before using it for relocation." May be this is why I have: Entry point address: 0x8000111 entry point of odd value Cortex-M4 supports only Thumb Mode and the entry point should probably be always odd. My compiler flags: -Wall -Wpointer-arith -Wstrict-prototypes -Wundef -Woverloaded-virtual -Wno-write-strings -mthumb -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -mcpu=cortex-m4 Linker flags: -mthumb -Wl,--gc-sections -Wl,-static -Wl,-n -g -nostdlib -mcpu=cortex-m4 Oleg -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss