|
From: Helge K. <Hel...@gm...> - 2021-09-08 08:54:10
|
On 08.09.2021 08:06, Tristan Williams wrote:
> Hi Helge,
>
> I don't use studio, but from the command line you give below
>
>> avrasm2.exe -fI -o my.hex -e my.eep -S my.tmp -W+ie -I"D:/Program Files
>> (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\avrasm\inc"
>> -I"amforth-6.9\avr8" -I"amforth-6.9\avr8\devices\atmega32"
>> -I"amforth-6.9\appl\arduino" -I"amforth-6.9\common" -im32def.inc -d
>> "Debug\myprog_m32.obj" "main.asm" -I "D:\Program Files
>> (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include"
>
> it looks like it is including files from the devices\atmega32
> directory and using m32def.inc which are associated with the atmega32
> chip rather than the atmega328p. Somewhere the target device needs to
> be set to an atmega328p.
This is a good point! With the correct include path I get a working,
self-compiled amForth. Further I removed the -im32def.inc. The file is
included in the amForth sources anyway.
Thank you.
Now I want to take the second step, build for ATmega2560. I use nearly
the same avrsam2 command line, but changed the include path from
amforth-6.9\avr8\devices\atmega32
to
amforth-6.9\avr8\devices\atmega2560
avrasm2.exe -fI -o my2560.hex -e my2560.eep -S my2560.tmp -W+ie
-I"amforth-6.9\avr8" -I"amforth-6.9\avr8\devices\atmega2560"
-I"amforth-6.9\appl\arduino" -I"amforth-6.9\common" -d
"Debug\my2560.obj" "main.asm" -I "D:\Program Files
(x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include"
Now I get several errors like:
error: Overlap in .cseg: addr=0x1f000 conflicts with 0x1f000:0x1f396
error: Overlap in .cseg: addr=0x1f001 conflicts with 0x1f000:0x1f396
...
error: Overlap in .cseg: addr=0x1f03e conflicts with 0x1f000:0x1f396
Shouldn't this compile out of the box?
I am also curious about this range 0x1f000:0xf1396.
Best regards,
Helge
|