Re: [Flashforth-devel] building flashforth with avra?
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2021-05-01 03:46:25
|
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 |