Bare metal embedded lecture-4: Writing linker scripts and section placement

preview_player
Показать описание
In this lecture you'll learn , writing GNU linker script from scratch , section placement, linker script commands ,syntax and linker script symbols

Want to learn Rust programming language? Check out our brand-new course
Coupon: NEWLAUNCHOFFER

Rust playlist
Рекомендации по теме
Комментарии
Автор

I have been searching for something exactly like this for months on end, tried a dozen books, searched countless tutorials on the internet but i think this is hands down the best resource for arm bare metal programming, only wish i had discovered it earlier

ahbarahad
Автор

This is pure gold! Thanks for doing this. When you put this course up for sale, do let me know. I'll buy it :)
I've bought all your courses already.

pitankar
Автор

The best ever course on linker scripts, thanks a lot Sir !!!

padmaraghunathan
Автор

Hi Kiran,
Why do you use - 4 in SRAM2 origin calculation? (Timestamp: 10:56)
Thanks so much for the video!

ulysses_grant
Автор

I love you for this precise and on-point explanation of Linker scripts!

prometheusdeveloper
Автор

What a stuff. So encouraging.. pls continue this series, there’s lot more to learn. 👍

deepakjoy
Автор

Can you suggest books referred here, which covers all these things?

pranit
Автор

Thank you so much for these videos!

Just wanted to add the following: I'm following along with an STM32L452RE, and in the .map file I could see that my .isr_vector table as well as any Handlers I had defined in my startup file were discarded (basically mapped to address 0x0). It turns out that instead of `*(.isr_vector)` I needed to write `KEEP(*(.isr_vector))`; the symbols are otherwise thrown away because they are not referenced somewhere else in the .o files. Just thought I'd put that out there for anyone who got stuck like me.

jimkokko
Автор

Thank you, will buy the course at a full price when it will be released!!

DimaS-nqrq
Автор

Think you for your patience and your explanation

anasskhaldi
Автор

Great Stuff, Curious why you made SRAM attribute RWX did you plan to store instructions in the same place as data?

jdwlsn
Автор

Hi Kiran, thanks for everything, will you explain the "GROUP"section? How to set stack and heap and where is the stack pointer stored after set in startup?

omercaylan
Автор

First of all thank you sir for this series its really helpful at this time.
I been working on QEMU emulator, it will be really helpful if you could make a educational video on this topic.

HimanshuSharma-dunz
Автор

This class was great, I've already purchased the full course on udemy.

AndresFH
Автор

Thank you so much for this .
I have a question is what happened if linker script is not provided to the linker ?

MohamedMohamed-zghg
Автор

Hello, thanks for sharing. I did not get why the -4 in the SRAM2-ORIGIN is needed!!

abdelfattehabidi
Автор

hi kiran - why do you subtract 4 while calculating SRAM2 ORIGIN ?

jankeshchakravarthy
Автор

Hi, thanks for the tutorial. One question, I checked the reference manual for stm32f407xx and it says that SRAM1 has a size of 112KB, how come we write it as 116KB in this linker script? thanks!

EDIT: I checked other comments and it seems it was a mistake, SRAM1 indeed has a size of 112KB.

sevenfernns
Автор

I am thinking on this for quite some time now. The FLASH starts at and because the isr_vector is put first, the stack pointer value is stored at Is that correct?

If so, then when the microcontroller powers up the PC would be pointing at 0x00 (please correct me if I am wrong). My understanding is that for the cortex controllers the stack pointer value needs to be stored at 0x00. But in our case it is at I am a bit confused as to how the controller will pickup the stackpointer value if FLASH doesn't start at 0x0. Can you please help me understand? Am I missing something?

pitankar
Автор

at the end of the lecture, you make _sbss = . ; and you've said location counter is tracking VMA, so the location counter is equal to SRAM, due to that it will overwite the .data section .. am i wrong ??

mohamedessam