Re: [Flashforth-devel] building flashforth with avra?
Brought to you by:
oh2aun
From: Christopher H. <chr...@li...> - 2021-05-04 06:01:54
|
That you for your help. I'm no expert on the subject at this point, but it seems like there must be some better way to do this than filling a ton of memory each time I upload FlashForth to a chip. Seems like I should be able to get something equivalent to .NRWW directive with some combination of a named section and a section address in a linker script. I'm mildly curious what is really going on behind that XC8 .NRWW "addition". Unless they've somehow crossed the assembler/linker boundry, they must pass some extra information on to the linker...? Something that gives instructions to their own linker script, or to a modified Gnu LD? Anyway, sounds like I've finally got an excuse now to become an expert on linking. On Sat, 2021-05-01 at 06:46 +0300, Mikael Nordman wrote: > I wrote this in an earlier post in this chain. > "You can try with the avr-gcc, but I believe it does not support the > .section .NRWW, code, address() directive. > Microchip stated the address() part was their addition to XC8, but > you can try." > You can use the ".fill" directive instead to fill the flash memory > with 0xffff so that the NRWW code > starts 0x400 bytes from the end of flash. > That solution makes for a much longer hex file, taking a longer time > to program the hex file into the chip. > > > On 2021-04-30 16:24, Christopher Howard wrote: > > Hi, I've put a few hours into trying to figure out how to build > > with just avr-gcc toolchain, without the proprietary XC8 assembler. > > To my surprise (given my lack of knowledge) I seemed to have gotten > > pretty far with this call > > > > avr-gcc -mmcu=atmega328p -I. -D__ATmega328P__ -x assembler-with-cpp > > ff-libre.asm > > > > Which mostly does not give errors, so long as I drop the "#include > > <xc.h>" directive from all the files. However, I'm stuck on this > > code: > > > > ;****************************************************************** > > * > > KERNEL_END: > > ;*********************************************************** > > .section .nrww, code, address(NRWW_START) > > ;************************************************************* > > > > which gives error > > > > ff-libre.asm: Assembler messages: > > ff-libre.asm:6334: Error: character following name is not '#' > > > > Not sure if there is some actual .section syntax incompatibility, > > or if I need another gcc flag, or if am trying to build the wrong > > output format (ELF, etc.)... > > > > > > > > -- > > Christopher Howard > > blog: https://librehacker.com > > social: https://gnusocial.club/librehacker > > > > > > On Fri, 2021-04-16 at 10:07 -0800, Christopher Howard wrote: > > > Thank you. I am hoping to play around with this in the next week > > > or so during some lunch break. > > > > > > Christopher > > > > > > -----Original Message----- > > > From: Mikael Nordman <mik...@fl...> > > > To: Christopher Howard <chr...@li...> > > > Subject: Re: [Flashforth-devel] building flashforth with avra? > > > Date: Fri, 16 Apr 2021 09:13:57 +0300 > > > > > > Hi Chris, > > > Here is the verbose output of building with XC8. > > > BR Mikael > > > > > > > > > -- > > -- > Mikael > > -- Christopher Howard blog: https://librehacker.com social: https://gnusocial.club/librehacker |