Just HOW does the gputils linker allocate the program memory?
From Johann Klammer@klammerj@NOSPAM.a1.net to comp.arch.embedded on Sat Oct 20 04:01:49 2018
From Newsgroup: comp.arch.embedded
Hello,
I have been writing a larger project
and seeing huge gaps in the map file(0x374-0xe00).
I've put all the regular code in PGM CODE sections
But some things needed specific addresses...
in main.asm I have:
...
DEVID CODE (with a matching section in the linker file)
..
vectors CODE 0x00
..
PROG0 CODE
...
in cmd.asm I have:
PROG0 CODE
...
in trig.asm I have:
PGM CODE
...
INITC0 CODE 0xE00
...
..and some other files with PGM CODE
the individual programmes are called like this:
gpasm -c -p p16f1713 main.asm -o main.o
gplink -m -s ./16f1713_g.lkr stack.o sreg.o common.o trig.o main.o parse.o cmd.o uart.o -o main.hex
the linker script is:
// File: 16f1713_g.lkr
// Modified linker script for the PIC16F1713 processor