Electronics > Microcontrollers
Let's discuss tellurium's tutorial
wek:
A non-IDE tutorial by tellurium started as a response to this thread.
https://github.com/cpq/bare-metal-programming-guide
wek:
I've just noticed Remove ENTRY() from the linker script
Can you please elaborate?
Thanks,
JW
peter-h:
ENTRY does something. This is the start of my linker script
--- Code: ---
/* Entry Point */
ENTRY(Reset_Handler)
/* Reference boot block stuff to ensure that it gets linked-in - not sure if these do anything */
/* EXTERN(b_main) */
/* EXTERN(KDE_loader) */
/* EXTERN(KDE_main_stub) */
--- End code ---
and the commented-out stuff definitely does nothing. But removing ENTRY causes the code to bomb immediately.
However, if I restart the code (in Cube) it runs fine. So the bombing occurs only after a debugger code load and reset release. A restart within Cube runs ok.
100% repeatable.
Even if I put a breakpoint here, it bombs after a debugger load
eutectique:
--- Quote from: wek on September 27, 2022, 02:25:16 pm ---I've just noticed Remove ENTRY() from the linker script
Can you please elaborate?
--- End quote ---
ENTRY() is only meaningful for creating and debugging the ELF file. It does nothing for binary (or hex, or srec for that matter) which is generated from ELF file -- the start address is the second word in the vector table for Cortex-M CPUs.
eutectique:
--- Quote ---Let's discuss tellurium's tutorial
--- End quote ---
Really well written.
Maybe I'd create a PR one day for:
* semihosting
* LLVM/Clang instead of GCC
Navigation
[0] Message Index
[#] Next page
Go to full version