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.

Kind regards,

Tristan

On 07Sep21 21:32, Helge Kruse wrote:
> I am a newby to amForth. I want to use it at ATmega 2560. For the first
> steps I want to use the more common board Arduino UNO.
> 
> I flashed the files uno.hex and uno.eep.hex from the directory
> amforth-6.9\appl\arduino to my Arduino UNO. This gives me a greeting
> 
> amforth 6.9 ATmega328P Forthduino
> >
> 
> I think, the mega328p fuses and the USB/serial connection are verified.
> Now I want to build the amForth from the sources. The documentation at
> http://amforth.sourceforge.net/UG/quick-windows.html is a bit dated (for
> amForth 6.6). The Atmel studio is not available anymore. I found only
> the Microchip Studio 7 as the successor of the Atmel studio at the
> Microchip website. (Atmel has been purchased by Microchip.)
> 
> I set up a main.asm file as
> 
>     .include "preamble.inc"
>     .equ F_CPU = 16000000
>     .include "drivers/usart.asm"
>     .include "amforth.asm"
> 
> and configured the include directories:
>       $(PackRepoDir)\atmel\ATmega_DFP\1.6.364\avrasm\inc
>       amforth-6.9\avr8
>       amforth-6.9\avr8\devices\atmega328p
>       amforth-6.9\appl\arduino
>       amforth-6.9\common
> Without these directories some .asm files had not been found. The
> Microchip Studio 7 compiles without errors:
> 
> 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"
> 
> 
> Segment   Begin    End      Code   Data   Used    Size   Use%
> -------------------------------------------------------------
> [.cseg] 0x000000 0x007f82   1838  11508  13346   32768  40.7%
> [.dseg] 0x000060 0x00011f      0    191    191    2048   9.3%
> [.eseg] 0x000000 0x000086      0    134    134    1024  13.1%
> Assembly complete, 0 errors. 8 warnings
> 
> I can also provide the complete assembler stdout stream. But I hesitate
> to send such a large mail to the list without request.
> 
> But after flashing my.hex and my.eep to the Arduino UNO I can see
> nothing. Therefore I assume something's wrong with my build.
> 
> Can somebody provide an minimum example for a basic amForth project with
> the Microchip Studio 7?
> Is there any updated documentation for the build process that handles
> the Studio 7 environment?
> Any hints how I find and remove the problem?
> 
> I hope this can be easily solved. I've seen in the mailing list archive
> that a build with mega2560 was successful lately.
> 
> Best regards,
> Helge
> 
> 
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 


_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to