This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: small custom bootloader to start an app stored in flash
- From: Oleg Uzenkov <o dot uzenkov at unicore dot co dot ua>
- To: Rainer Arndt <arndt at ibehs dot de>, Edgar Grimberg <edgar dot grimberg at gmail dot com>, Sergei Gavrikov <sergei dot gavrikov at gmail dot com>
- Cc: eCos Discussion <ecos-discuss at sourceware dot org>
- Date: Thu, 23 Oct 2014 14:50:19 +0300
- Subject: Re: small custom bootloader to start an app stored in flash
- Authentication-results: sourceware.org; auth=none
- References: <544618E5 dot 90101 at unicore dot co dot ua> <CAPrjMDAi=cqTSQ-d-c9FF53W-c6=v0j8rzSLQfuTcBQUY43Zpw at mail dot gmail dot com> <54479031 dot 9080106 at unicore dot co dot ua> <1C548879-90CC-458E-966B-0A8C88C4D7A6 at ibehs dot de>
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