1 year ago

#168560

test-img

FourierFlux

Creating and uploading PIC in GCC

Suppose I wish to create position independent code which will be dynamically loaded by a MCU.

GCC allows for compiling PIC but I am unsure what the process is to get the final binary output.

To clarify, suppose I have implemented a C function which is self contained(no global var). I have a separate RTOS on my MCU which will downloaded this function and run it at a specific address.

What is the process for compiling this function and getting the binary image to upload to the MCU? What would my linker script look like in this case?

gcc

linker

microcontroller

gnu-assembler

position-independent-code

0 Answers

Your Answer

Accepted video resources