Electronics > Microcontrollers

Let's discuss tellurium's tutorial

(1/6) > >>

A non-IDE tutorial by tellurium started as a response to this thread.


I've just noticed Remove ENTRY() from the linker script

Can you please elaborate?



ENTRY does something. This is the start of my linker script

--- Code: ---
/* Entry Point */

/* 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


--- 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.


--- 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


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod