vscode-amiga-debug
vscode-amiga-debug copied to clipboard
bss section in chip mem
I fail to put a bss section in chip memory. .section .bss_chip, .bss.MEMF_CHIP, .section .bsschip, attribute((chip)) etc -none is working. Could you point me in the right direction? Thank you.
Have you had a look at the included starter project? https://github.com/BartmanAbyss/vscode-amiga-debug/blob/master/template/main.c#L151 This works for data, maybe it also works for BSS. Haven't tried...
Thank you. Yes, I first tried to modify the existing macros in gcc8_c_support.h without success.
volatile UBYTE testbuffer[51200] attribute((section (".MEMF_CHIP"))); Will allocate testbuffer in chip memory as data (and increase filesize)
volatile UBYTE testbuffer[51200] attribute((section (".bss"))); Will allocate testbuffer in non-chip memory as bss (and not increase filesize)
volatile UBYTE testbuffer[51200] attribute((section (".bss.MEMF_CHIP"))); Will allocate testbuffer in non-chip memory as bss (and not increase filesize)
I feel that I am missing something fundamental here on what is actually allocating these sections and where.
I poked around a bit in Bebbo's gcc and there is a mention of a "chip" attribute keyword, but it seems not to be present in the gcc included here. Also when searching the source I see .bsschip / .bss_chip but none of them works when trying here.
I'm running into the same problem.
Any chance this is something relatively easy to fix?
I would recommend this "simple" approach (works without linker scripts). Can probably be wrapped into a macro or something for easier reuse:
__asm__(
".pushsection .BeEsEs.MEMF_CHIP, \"aw\", @nobits\n"
".global beeses\n"
"beeses:\n"
".balign 2\n"
".nop 2048*2\n"
".popsection\n"
);
extern unsigned short beeses[2048];
you can ofcourse change the section name .BeEsEs
(just not .bss
).