You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(6) |
Mar
(41) |
Apr
(23) |
May
(11) |
Jun
(2) |
Jul
|
Aug
|
Sep
(9) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(6) |
Feb
(1) |
Mar
(23) |
Apr
(18) |
May
(21) |
Jun
(13) |
Jul
(34) |
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(4) |
2009 |
Jan
|
Feb
(5) |
Mar
(5) |
Apr
(10) |
May
(1) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(13) |
2010 |
Jan
(10) |
Feb
(4) |
Mar
(28) |
Apr
(3) |
May
(38) |
Jun
(22) |
Jul
(92) |
Aug
(154) |
Sep
(218) |
Oct
(45) |
Nov
(20) |
Dec
(1) |
2011 |
Jan
(33) |
Feb
(15) |
Mar
(32) |
Apr
(33) |
May
(48) |
Jun
(35) |
Jul
(7) |
Aug
|
Sep
(11) |
Oct
(5) |
Nov
|
Dec
(7) |
2012 |
Jan
(56) |
Feb
(11) |
Mar
(6) |
Apr
|
May
(128) |
Jun
(59) |
Jul
(21) |
Aug
(16) |
Sep
(24) |
Oct
(39) |
Nov
(12) |
Dec
(12) |
2013 |
Jan
(14) |
Feb
(61) |
Mar
(97) |
Apr
(46) |
May
(13) |
Jun
(23) |
Jul
(12) |
Aug
(25) |
Sep
(9) |
Oct
(81) |
Nov
(73) |
Dec
(45) |
2014 |
Jan
(36) |
Feb
(57) |
Mar
(20) |
Apr
(41) |
May
(43) |
Jun
(11) |
Jul
(14) |
Aug
(32) |
Sep
(9) |
Oct
(27) |
Nov
(21) |
Dec
(6) |
2015 |
Jan
(14) |
Feb
(23) |
Mar
(1) |
Apr
(19) |
May
(40) |
Jun
(11) |
Jul
(1) |
Aug
(2) |
Sep
(14) |
Oct
(10) |
Nov
(9) |
Dec
(13) |
2016 |
Jan
(4) |
Feb
(3) |
Mar
(7) |
Apr
|
May
(4) |
Jun
(13) |
Jul
(8) |
Aug
(3) |
Sep
(4) |
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
(1) |
Mar
(1) |
Apr
(7) |
May
(10) |
Jun
(5) |
Jul
(7) |
Aug
(9) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
(3) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(54) |
Nov
(47) |
Dec
(53) |
2019 |
Jan
(23) |
Feb
(24) |
Mar
(19) |
Apr
(15) |
May
(5) |
Jun
(34) |
Jul
(9) |
Aug
(9) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(7) |
Apr
(7) |
May
(5) |
Jun
(15) |
Jul
(22) |
Aug
(28) |
Sep
(13) |
Oct
(9) |
Nov
(17) |
Dec
(13) |
2021 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(9) |
May
(21) |
Jun
(9) |
Jul
|
Aug
(6) |
Sep
(16) |
Oct
|
Nov
(1) |
Dec
(6) |
2022 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
(21) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2024 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Tristan W. <ho...@tj...> - 2021-06-02 15:36:43
|
Hi Michael, I used FUSE : -U lfuse:w:0xff:m -U hfuse:w:0x99:m -U efuse:w:0xff:m Best wishes, Tristan On 02Jun21 07:14, Placerville.me wrote: > Hello Tristan, > Thank you for this! I will give it a try later today. What fuse settings did you use? > > Kind regards, > > Michael > > Sent from my iPhone > > > On Jun 2, 2021, at 01:18, Tristan Williams <ho...@tj...> wrote: > > > > Hi Michael, > > > > I hope you got AmForth to build successfully under windows for the > > atmega2560, but if not, I have built it for my Arduino MEGA using the > > most recent source (r2457). > > > > https://sourceforge.net/p/amforth/code/HEAD/tree/trunk/ > > > > I have uploaded the resulting hex files to > > > > https://tjnw.co.uk/amforth-bin/ > > > > I also loaded marker.frt onto the Arduino MEGA and checked that it > > does what it should do (see [1]). > > > > Best wishes, > > Tristan > > > > [1] http://amforth.sourceforge.net/TG/recipes/Forget.html > > > >> On 24May21 17:57, Michael Picco wrote: > >> Hello Martin, > >> Thank you for responding! > >> In my work directory, which is aptly named 'amforth-6.9', I don't see a copy > >> of the template.asm file with "amforth-low.asm" mentioned. The > >> amforth-low.asm file is referenced in the avr8 subdirectory. Is there > >> something I am missing? > >> > >> Kind regards, > >> Michael > >> > >> > >> > >> > >>> On 5/24/2021 10:19 AM, Martin Nicholas via Amforth-devel wrote: > >>> The crucial file to include for an ATmega is the confusingly named: > >>> "amforth-low.asm" which needs to be un-commented in template.asm. > >>> > >>> All the code is then in low flash memory apart from the flash burning > >>> routine which should be found at NRWW_START_ADDR (0x01f000). > >>> > >>> Often, with a new device, you need to burn the fuses "make write-fuse", > >>> before flashing (and burning fuses for a second time) with "make > >>> install". > >>> > >> > >> > >> > >> _______________________________________________ > >> Amforth-devel mailing list for http://amforth.sf.net/ > >> Amf...@li... > >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > > _______________________________________________ > > Amforth-devel mailing list for http://amforth.sf.net/ > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Placerville.me <mp...@pl...> - 2021-06-02 14:15:05
|
Hello Tristan, Thank you for this! I will give it a try later today. What fuse settings did you use? Kind regards, Michael Sent from my iPhone > On Jun 2, 2021, at 01:18, Tristan Williams <ho...@tj...> wrote: > > Hi Michael, > > I hope you got AmForth to build successfully under windows for the > atmega2560, but if not, I have built it for my Arduino MEGA using the > most recent source (r2457). > > https://sourceforge.net/p/amforth/code/HEAD/tree/trunk/ > > I have uploaded the resulting hex files to > > https://tjnw.co.uk/amforth-bin/ > > I also loaded marker.frt onto the Arduino MEGA and checked that it > does what it should do (see [1]). > > Best wishes, > Tristan > > [1] http://amforth.sourceforge.net/TG/recipes/Forget.html > >> On 24May21 17:57, Michael Picco wrote: >> Hello Martin, >> Thank you for responding! >> In my work directory, which is aptly named 'amforth-6.9', I don't see a copy >> of the template.asm file with "amforth-low.asm" mentioned. The >> amforth-low.asm file is referenced in the avr8 subdirectory. Is there >> something I am missing? >> >> Kind regards, >> Michael >> >> >> >> >>> On 5/24/2021 10:19 AM, Martin Nicholas via Amforth-devel wrote: >>> The crucial file to include for an ATmega is the confusingly named: >>> "amforth-low.asm" which needs to be un-commented in template.asm. >>> >>> All the code is then in low flash memory apart from the flash burning >>> routine which should be found at NRWW_START_ADDR (0x01f000). >>> >>> Often, with a new device, you need to burn the fuses "make write-fuse", >>> before flashing (and burning fuses for a second time) with "make >>> install". >>> >> >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Tristan W. <ho...@tj...> - 2021-06-02 08:18:35
|
Hi Michael, I hope you got AmForth to build successfully under windows for the atmega2560, but if not, I have built it for my Arduino MEGA using the most recent source (r2457). https://sourceforge.net/p/amforth/code/HEAD/tree/trunk/ I have uploaded the resulting hex files to https://tjnw.co.uk/amforth-bin/ I also loaded marker.frt onto the Arduino MEGA and checked that it does what it should do (see [1]). Best wishes, Tristan [1] http://amforth.sourceforge.net/TG/recipes/Forget.html On 24May21 17:57, Michael Picco wrote: > Hello Martin, > Thank you for responding! > In my work directory, which is aptly named 'amforth-6.9', I don't see a copy > of the template.asm file with "amforth-low.asm" mentioned. The > amforth-low.asm file is referenced in the avr8 subdirectory. Is there > something I am missing? > > Kind regards, > Michael > > > > > On 5/24/2021 10:19 AM, Martin Nicholas via Amforth-devel wrote: > > The crucial file to include for an ATmega is the confusingly named: > > "amforth-low.asm" which needs to be un-commented in template.asm. > > > > All the code is then in low flash memory apart from the flash burning > > routine which should be found at NRWW_START_ADDR (0x01f000). > > > > Often, with a new device, you need to burn the fuses "make write-fuse", > > before flashing (and burning fuses for a second time) with "make > > install". > > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Martin N. <amf...@mg...> - 2021-05-25 06:01:34
|
On Mon, 24 May 2021 17:57:51 -0700 Michael Picco <mp...@pl...> wrote: > Hello Martin, > Thank you for responding! > In my work directory, which is aptly named 'amforth-6.9', I don't see > a copy of the template.asm file with "amforth-low.asm" mentioned. > The amforth-low.asm file is referenced in the avr8 subdirectory. Is > there something I am missing? > > Kind regards, > Michael > The file is here: appl/template/template.asm I'm wrong as to where "amforth-low.asm" is included. In a vanilla system the include is in: appl/atmega2561/atmega256.asm There is an atmega256 build in: appl/atmega2561/ Probably the most suitable Makefile is: appl/template/makefile or possibly: appl/arduino/Makefile -- Regards, Martin Nicholas. E-mail: rep...@mg... (Address will be valid throughout 2021). |
From: Michael P. <mp...@pl...> - 2021-05-25 00:58:09
|
Hello Martin, Thank you for responding! In my work directory, which is aptly named 'amforth-6.9', I don't see a copy of the template.asm file with "amforth-low.asm" mentioned. The amforth-low.asm file is referenced in the avr8 subdirectory. Is there something I am missing? Kind regards, Michael On 5/24/2021 10:19 AM, Martin Nicholas via Amforth-devel wrote: > The crucial file to include for an ATmega is the confusingly named: > "amforth-low.asm" which needs to be un-commented in template.asm. > > All the code is then in low flash memory apart from the flash burning > routine which should be found at NRWW_START_ADDR (0x01f000). > > Often, with a new device, you need to burn the fuses "make write-fuse", > before flashing (and burning fuses for a second time) with "make > install". > |
From: Erich W. <ew....@na...> - 2021-05-24 19:43:33
|
I took the liberty to snip off the thread. Hello Michael, Michael Picco <mp...@pl...> writes: > Hello! > > I seem to have stumbled across an issue. > > First code I wrote was to blink the LED onboard. This worked just fine. > Then I went to add 'marker'. Entered it line-by-line ... got the 'Ok' after > each line. After adding the last line (semicolon), the board froze up. Did a > warm boot and then executed 'words' to see what was there. It came back with > ?? -13 5. > > What came to mind is perhaps not enough memory is allocated prior to flashing > and I'm overwriting something I shouldn't. > > Any ideas? I THOUGHT marker.frt needed something else, but apparently not: On a atmega644pa with a brand new installed amforth 6.9: > > ver > amforth 6.9 ATmega644P ok > > words > int-trap int@ int! -int +int #int irq[]# >body s>d bounds > init-ram ee>ram #tib tib source-tib ... ok > > Inspecting avr8/lib/forth2012/core-ext/marker.frt There are no '#include', no '#requires' or other unobvious things. I loaded just marker.frt (ignore the tools, just look at the echo of amforth-upload.py) > $ make marker CONSOLE=/dev/ttyUSB2 MARKER_LIST=lib-avr8/forth2012/core-ext/marker.frt > cat lib-avr8/forth2012/core-ext/marker.frt | unfold_fs | trim_fs > zz.tmp.fs > amforth-upload.py -t /dev/ttyUSB2 zz.tmp.fs > : marker > ok get-current @e dp > ok create > ok (marker) 0 do i @e , 2 +loop > ok , , > ok does> > ok (marker) 0 do dup @i i !e 1+ 2 +loop > ok dup @i to dp > ok 1+ @i get-current !e > ok; > ok > time: 2.2858850956 seconds > rm -f zz.tmp.fs Works for me(tm). Back to the serial console: > > words > marker int-trap int@ int! -int +int #int irq[]# >body s>d bounds > init-ram ee>ram #tib tib source-tib ... > ... applturnkey postpone (marker) end-code code ... ok > > Note that ' (marker) ' is deeper down the wordlist. So? > ?? -13 5 says: there was an error (-13) before column 5 in the input. Example: > > 1 2 + bla > ?? -13 9 > > HOWEVER, the controller should not freeze. Sometimes it looks like it's frozen, because the cmd loop is still in compiling mode after ':'. So entering ';' sometimes makes the prompt appear again. Cheers, Erich >snip<----------- -- May the Forth be with you ... |
From: Martin N. <amf...@mg...> - 2021-05-24 17:33:14
|
The crucial file to include for an ATmega is the confusingly named: "amforth-low.asm" which needs to be un-commented in template.asm. All the code is then in low flash memory apart from the flash burning routine which should be found at NRWW_START_ADDR (0x01f000). Often, with a new device, you need to burn the fuses "make write-fuse", before flashing (and burning fuses for a second time) with "make install". -- Regards, Martin Nicholas. E-mail: rep...@mg... (Address will be valid throughout 2021). |
From: Robert B. <bra...@ic...> - 2021-05-24 16:44:40
|
Hello, Several years ago (Nov 2012), I tried to get amforth running on an Arduine2560. After a LOT of pain I succeded. I wrote the following to the board, and it is probably somewhere in the archives. Anyway……I do not know if the issues that you are experiencing are the same, but it sure sounds familiar….. here goes: ---------------------------------------------------------------------------------------- I've been trying to get amforth running on an ARDUINO MEGA 2560. I've been using Atmel Studio 6, and a avr dragon board to do the programming, AND i have been using the atmel provided device programming tool (not avrdude). I have managed to make it all work, though. Its a pretty ugly hack. I have been studying amforth, and I *think* that I sorta understand how it works. Here in a nut shell is what I ended up doing. If you compile the code and try to burn it into the arduino board, it simply will not work. The Atmel software loads the lower code where it belongs, but then it loads the high code waaaaayy up at $3E000, which is exactly what the code tells it to do. I am not conversant enough with the amforth code to know how to make it work up there, and try as I might, I could not find any reference to anybody who had succeeded in doing so. What I ended up doing was this...... I manually orged the high code to $3800. This will work until you want to create a new word, or write to flash, at which point the code locks up because it cannot write to that section of flash from there. In the core word !i-nrww I put a jump to DO_STOREI_atmega. I put a label on the pop yh statement that follows that. I cut the entire DO_STOREI_atmega section out. at the end of the last piece of high section code, (i think it was words), I put an .org $1f000 and pasted the DO_STOREI_atmega code there. After the rcall dospm, I put a jmp back to the pop yh statement that follows that. Although that, in fact, would have worked, I didn't realize it because the process of burning the code into the arduino involved burning the flash, then the eeprom. Unfortunately immediately after the flash is burned, the arduino resets, cannot find its brains in the eeprom, and encounters the relocated !i-nrww code which promptly erases a goodly part of the first page of flash. The solution I ended up with was to place a simple continuously looping assembly led blinky routine immediately after the .org $1f000, with the !i-nrww code immediately after that. This works. As far as I can see, it is a normal amforth installation. I can create new words, and so far things seem to work. > On May 23, 2021, at 7:02 PM, Michael Picco <mp...@pl...> wrote: > > Thank you for that. > Reading up on them yields: > not found ... the position in the input line indicates the system choked on the word 'words'. > > words is part of the flashed system. > > This indicates (to me) that something got corrupted. I can only wonder if memory got overwritten somehow. Is there a setting required prior to flashing that I'm failing to set properly? > > Thanks in advance! > > On 5/22/2021 9:51 PM, George Herzog wrote: >> There are AmForth error codes. Read up on them. >> >> On Sun, May 23, 2021, 12:42 Michael Picco <mp...@pl...> wrote: >> >>> Hello! >>> >>> I seem to have stumbled across an issue. >>> >>> First code I wrote was to blink the LED onboard. This worked just fine. >>> Then I went to add 'marker'. Entered it line-by-line ... got the 'Ok' >>> after each line. After adding the last line (semicolon), the board >>> froze up. Did a warm boot and then executed 'words' to see what was >>> there. It came back with ?? -13 5. >>> >>> What came to mind is perhaps not enough memory is allocated prior to >>> flashing and I'm overwriting something I shouldn't. >>> >>> Any ideas? >>> >>> Kind regards, >>> >>> Michael >>> >>> On 5/21/2021 1:28 AM, tristan wrote: >>>> Hi Michael, >>>> >>>> Apologies. My memory is failing me. >>>> >>>> The LED is on D13 for both UNO and MEGA, but D13 is mapped to PB5 >>>> (PORTB bit 5) on the UNO and PB7 (PORTB bit 7) on the MEGA. >>>> >>>> Best wishes, >>>> Tristan >>>> >>>> >>>> On 2021-05-21 08:54, tristan wrote: >>>>> Hi Michael, >>>>> >>>>>> I do not see the word 'marker' defined. Should it have been part of >>>>>> the basic system, or do I need to pull it from somewhere? >>>>> It is not part of the basic system, it is defined in this file. >>>>> >>>>> avr8/lib/forth2012/core-ext/marker.frt >>>>> >>>>> Using marker is efficient/good practice/etc. but it is not a necessary >>>>> requirement to do below. >>>>> >>>>>> Then I'd like to see about doing something real simple, like turning >>>>>> an LED on/off. It's sort of a hardware person's approach to 'Hello >>>>>> World!' :) >>>>> http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html >>>>> >>>>> IIRC the MEGA and UNO have the built-in led on the same pin (port bit). >>>>> >>>>> The definitions for the chip can be found in this file >>>>> >>>>> avr8/devices/atmega2560/atmega2560.frt >>>>> >>>>> These, or extracts from, will need to be loaded into the basic system. >>>>> So longer term, being able to load forth definition non-interactively >>>>> from a file is very useful. There are programs in the tools directory >>>>> - amforth-shell.py being the one I use. >>>>> >>>>> >>>>> Best wishes, >>>>> Tristan >>>>> >>>>> >>>>> >>>>> On 2021-05-21 05:25, Michael Picco wrote: >>>>>> Hello, >>>>>> >>>>>> As mentioned earlier, it's now working. >>>>>> I do not see the word 'marker' defined. Should it have been part of >>>>>> the basic system, or do I need to pull it from somewhere? >>>>>> Then I'd like to see about doing something real simple, like turning >>>>>> an LED on/off. It's sort of a hardware person's approach to 'Hello >>>>>> World!' :) >>>>>> >>>>>> Kind regards, >>>>>> >>>>>> Michael >>>>>> K6MLE >>>>>> >>>>>> >>>>>> On 5/20/2021 12:41 PM, Michael Picco wrote: >>>>>>> I should add the following changes to Craig Lindley's write-up: >>>>>>> >>>>>>> Step 3: >>>>>>> Under Win10, the correct file location for avrasm2.exe will be: >>>>>>> c:\Program >>>>>>> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe >>>>>>> >>>>>>> Also needed in the work directory isatmega256.asm and m2560def.inc >>>>>>> >>>>>>> The image of the directory structure didn't post to the list, so >>>>>>> I'm showing it below (my work directory is called >>>>>>> "amforth-ATmega2560-6.9": >>>>>>> >>>>>>> -- appl >>>>>>> -- arm >>>>>>> -- avr8 >>>>>>> -- common >>>>>>> -- doc >>>>>>> -- examples >>>>>>> -- msp430 >>>>>>> -- risc-v >>>>>>> -- shared >>>>>>> -- tests >>>>>>> -- tools >>>>>>> -- words >>>>>>> atmega256.asm >>>>>>> avrasm2.exe >>>>>>> device.asm (for the 2560) >>>>>>> device.inc (for the 2560) >>>>>>> dict_appl.inc >>>>>>> dict_appl_core.inc >>>>>>> LICENSE.txt >>>>>>> m2560def.inc >>>>>>> make.bat >>>>>>> readme.txt >>>>>>> uno.asm >>>>>>> >>>>>>> Hope this helps! >>>>>>> >>>>>>> Kind regards, >>>>>>> >>>>>>> Michael >>>>>>> K6MLE >>>>>>> >>>>>>> >>>>>>> On 5/20/2021 11:56 AM, Michael Picco wrote: >>>>>>>> Hello All! >>>>>>>> >>>>>>>> I have finally had success! >>>>>>>> It turns out that the .eep and .hex files I was flashing into the >>>>>>>> 2560 were corrupted! >>>>>>>> I followed Craig Lindley's write-up with modifications for the 2560. >>>>>>>> Changed the make.bat file to read: avrasm2.exe -fI -o >>>>>>>> atmega2560.hex -e atmega2560.eep -l atmega2560.lst -I >>>>>>>> g:\amforth-atmega2560\common -I g:\amforth-atmega2560\avr8 -I >>>>>>>> g:\amforth-atmega2560\avr8\drivers -I include -v0 atmega256.asm >>>>>>>> >>>>>>>> This is the resulting file structure prior to executing make.bat: >>>>>>>> >>>>>>>> The fuse setting in Studio 7 were set as follows: >>>>>>>> E: 0xFF, H: 0xDC, L:0xFF >>>>>>>> >>>>>>>> Programmed the fuses; set the new files up in Studio 7 for flash >>>>>>>> and EEPROM; programmed the .hex and .eep files. >>>>>>>> >>>>>>>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! >>>>>>>> >>>>>>>> I'm hoping this exercise might help others. >>>>>>>> >>>>>>>> Kind regards, >>>>>>>> >>>>>>>> Michael >>>>>>>> K6MLE >>>>>>>> >>>>>>>> On 5/18/2021 8:51 AM, tristan wrote: >>>>>>>>> Hello Michael, >>>>>>>>> >>>>>>>>> Getting AmForth up and running from archive hex files on a >>>>>>>>> mega2560 is reasonably straightforward, however, I don't use >>>>>>>>> Microchip Studio version 7 or win10 so I can't help with this >>>>>>>>> tool set. I hope you able to translate the macos/linux to your >>>>>>>>> tools - and if so a write-up would be very welcome! >>>>>>>>> >>>>>>>>> As pointed out you need a programmer (such as usbtiny, usbasp, >>>>>>>>> avrisp2 etc.) and a program to talk to the programmer (such as >>>>>>>>> avrdude). >>>>>>>>> >>>>>>>>> Both atmega2560.hex and atmega2560.eep.hex need to be written to >>>>>>>>> the mega2560's flash/eeprom. Below are the command lines I use >>>>>>>>> with avrdude >>>>>>>>> >>>>>>>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >>>>>>>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >>>>>>>>> >>>>>>>>> Flashing these file will overwrite any existing bootloader. It is >>>>>>>>> worth considering whether you are able to reverse this should you >>>>>>>>> wish to, before flashing the above files. >>>>>>>>> >>>>>>>>> If your mega2560 is an Arduino style board, and the default fuses >>>>>>>>> unchanged, then IIRC there is no need to reprogram the fuses. >>>>>>>>> >>>>>>>>> Once the files have been flashed, you should be able to connect >>>>>>>>> to the mega2560 over serial using 38400 8N1. I use minicom and >>>>>>>>> amforth-shell.py You will need to identify the name of the serial >>>>>>>>> device created by the USB to SERIAL chip on your board/setup to >>>>>>>>> use any serial program. >>>>>>>>> >>>>>>>>> Once connected you have the AmForth interpreter prompt and can >>>>>>>>> interact, compile new words, and generally use the system. >>>>>>>>> However, AmForth is modular and not all functionality is >>>>>>>>> contained in the flashed hex files. For I2C and SPI new words >>>>>>>>> need to be defined. These definitions are already available >>>>>>>>> within the archive, but need to be loaded onto a "new" AmForth >>>>>>>>> system. I find amforth-shell.py very helpful for automating this >>>>>>>>> process. >>>>>>>>> >>>>>>>>> The cookbook is a great place to see examples of how things can >>>>>>>>> be done >>>>>>>>> >>>>>>>>> http://amforth.sourceforge.net/TG/Cookbook.html >>>>>>>>> >>>>>>>>> And for I2C, below is very helpful >>>>>>>>> >>>>>>>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >>>>>>>>> >>>>>>>>> Let us know how you get on. >>>>>>>>> >>>>>>>>> >>>>>>>>> Best wishes, >>>>>>>>> Tristan >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 2021-05-18 14:31, BK Navarette wrote: >>>>>>>>>> Be careful, the fuse settings particularly the boot size is >>>>>>>>>> different >>>>>>>>>> for flash forth vs amforth. >>>>>>>>>> >>>>>>>>>> Brian >>>>>>>>>> >>>>>>>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>>>>>>>>> Hello, >>>>>>>>>>> I have not used Amforth >>>>>>>>>>> But the installation mechanisms are the same as for FlashForth: >>>>>>>>>>> >>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>>>>>>>>> once FORTH is installed, you must write the programs in FORTH >>>>>>>>>>> language and >>>>>>>>>>> have them compile by FORTH on the ARDUINO card. >>>>>>>>>>> FORTH is an interpreter and a compiler. We communicate with >>>>>>>>>>> FORTH via >>>>>>>>>>> terminal software: >>>>>>>>>>> >>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>>>>>>>>> Unless I'm mistaken, you need an MKII programmer, because you >>>>>>>>>>> can only >>>>>>>>>>> inject a .HEX file through this device. This operation >>>>>>>>>>> overwrites the >>>>>>>>>>> original bootloader. >>>>>>>>>>> BR >>>>>>>>>>> >>>>>>>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco >>>>>>>>>>> <mp...@pl...> a écrit : >>>>>>>>>>> >>>>>>>>>>>> Hello, >>>>>>>>>>>> >>>>>>>>>>>> I am attempting to use the mega2560 as a nicely featured >>>>>>>>>>>> development >>>>>>>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 >>>>>>>>>>>> box, with >>>>>>>>>>>> Microchip Studio version 7 installed. >>>>>>>>>>>> >>>>>>>>>>>> In the zip file, under appl/atmega2561, I notice >>>>>>>>>>>> atmega256.eep.hex and >>>>>>>>>>>> atmega256.hex. The eep.hex file doesn't seem to get >>>>>>>>>>>> recognized by >>>>>>>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>>>>>>>>> >>>>>>>>>>>> Can I start building the platform by flashing these files into >>>>>>>>>>>> the >>>>>>>>>>>> board? If so, what is the process to add functionality (I2C, >>>>>>>>>>>> SPI, >>>>>>>>>>>> etc.)? As a total newbie! >>>>>>>>>>>> >>>>>>>>>>>> If it's necessary to recompile and create new hex files, the >>>>>>>>>>>> process is >>>>>>>>>>>> unclear. Is it spelled out somewhere such that a beginner can >>>>>>>>>>>> follow >>>>>>>>>>>> some basic steps to make the proper file(s)? >>>>>>>>>>>> >>>>>>>>>>>> It is my understanding that both flash and EEPROM need to be >>>>>>>>>>>> written, >>>>>>>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have >>>>>>>>>>>> these correct? >>>>>>>>>>>> >>>>>>>>>>>> Once I get this figured out, I'd like to submit a write-up for >>>>>>>>>>>> newbies >>>>>>>>>>>> and perhaps draw more users into AmForth. How might I get >>>>>>>>>>>> this posted, >>>>>>>>>>>> when completed? >>>>>>>>>>>> >>>>>>>>>>>> Thank you in advance! >>>>>>>>>>>> >>>>>>>>>>>> Kind regards, >>>>>>>>>>>> >>>>>>>>>>>> Michael >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>>>> Amf...@li... >>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>>> Amf...@li... >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>> Amf...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>> Amf...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>> Amf...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>> Amf...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>> Amf...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Mark R. <cab...@gm...> - 2021-05-24 09:08:09
|
Hello. If your High fuse is set to 0xDC that is probably your problem. From what I see that gives you a 1k boot section and Amforth is probably trying to blast past that. I have some strange fails when I first flashed my 1284p chips. Checking with a fuse calculator it looks like that chip should be D9 for a 4k boot section. Here is a link to the calculator I used. http://eleccelerator.com/fusecalc/fusecalc.php?chip=atmega2560&LOW=E0&HIGH=D9&EXTENDED=FC&LOCKBIT=FF Hope that is a bit helpful, Mark On Mon, May 24, 2021 at 11:47 AM tristan <ho...@tj...> wrote: > Hi Michael, > > AmForth uses a dictionary to store the words it knows about. When > AmForth recognises it has received a word over the serial line it tries > to lookup that word in its dictionary. If it finds the word, it executes > that word. If it does not, then it reports an error. > > In the file marker.frt is the definition for the word marker. This word > will create a word that will manipulate the dictionary. See this link > below > > http://amforth.sourceforge.net/TG/recipes/Forget.html > > Your AmForth system is indeed corrupted (and will need to be > re-flashed). Why it has become corrupted needs some more investigation. > Perhaps there is a word that marker relies on that is missing from your > hex build, perhaps you made a typo when typing in the definition, > perhaps you have found a bug[a]. I would > > 1. Re-flash the board > 2. Connect over serial, check that word lists the dictionary, define a > trivial word e.g. : xx 1 + ; and check that it works and can be listed > in the dictionary. > 3. Use amforth-shell.py to load avr8/lib/forth2012/core-ext/marker.frt > 4. Repeat 2. > 5. Do the example in > http://amforth.sourceforge.net/TG/recipes/Forget.html > > Best wishes, > Tristan > > [a] I use marker very frequently on atmega328p but not on the atmega2560 > > > > On 2021-05-24 00:02, Michael Picco wrote: > > Thank you for that. > > Reading up on them yields: > > not found ... the position in the input line indicates the system > > choked on the word 'words'. > > > > words is part of the flashed system. > > > > This indicates (to me) that something got corrupted. I can only > > wonder if memory got overwritten somehow. Is there a setting required > > prior to flashing that I'm failing to set properly? > > > > Thanks in advance! > > > > On 5/22/2021 9:51 PM, George Herzog wrote: > >> There are AmForth error codes. Read up on them. > >> > >> On Sun, May 23, 2021, 12:42 Michael Picco <mp...@pl...> > >> wrote: > >> > >>> Hello! > >>> > >>> I seem to have stumbled across an issue. > >>> > >>> First code I wrote was to blink the LED onboard. This worked just > >>> fine. > >>> Then I went to add 'marker'. Entered it line-by-line ... got the > >>> 'Ok' > >>> after each line. After adding the last line (semicolon), the board > >>> froze up. Did a warm boot and then executed 'words' to see what was > >>> there. It came back with ?? -13 5. > >>> > >>> What came to mind is perhaps not enough memory is allocated prior to > >>> flashing and I'm overwriting something I shouldn't. > >>> > >>> Any ideas? > >>> > >>> Kind regards, > >>> > >>> Michael > >>> > >>> On 5/21/2021 1:28 AM, tristan wrote: > >>>> Hi Michael, > >>>> > >>>> Apologies. My memory is failing me. > >>>> > >>>> The LED is on D13 for both UNO and MEGA, but D13 is mapped to PB5 > >>>> (PORTB bit 5) on the UNO and PB7 (PORTB bit 7) on the MEGA. > >>>> > >>>> Best wishes, > >>>> Tristan > >>>> > >>>> > >>>> On 2021-05-21 08:54, tristan wrote: > >>>>> Hi Michael, > >>>>> > >>>>>> I do not see the word 'marker' defined. Should it have been part > >>>>>> of > >>>>>> the basic system, or do I need to pull it from somewhere? > >>>>> It is not part of the basic system, it is defined in this file. > >>>>> > >>>>> avr8/lib/forth2012/core-ext/marker.frt > >>>>> > >>>>> Using marker is efficient/good practice/etc. but it is not a > >>>>> necessary > >>>>> requirement to do below. > >>>>> > >>>>>> Then I'd like to see about doing something real simple, like > >>>>>> turning > >>>>>> an LED on/off. It's sort of a hardware person's approach to > >>>>>> 'Hello > >>>>>> World!' :) > >>>>> http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html > >>>>> > >>>>> IIRC the MEGA and UNO have the built-in led on the same pin (port > >>>>> bit). > >>>>> > >>>>> The definitions for the chip can be found in this file > >>>>> > >>>>> avr8/devices/atmega2560/atmega2560.frt > >>>>> > >>>>> These, or extracts from, will need to be loaded into the basic > >>>>> system. > >>>>> So longer term, being able to load forth definition > >>>>> non-interactively > >>>>> from a file is very useful. There are programs in the tools > >>>>> directory > >>>>> - amforth-shell.py being the one I use. > >>>>> > >>>>> > >>>>> Best wishes, > >>>>> Tristan > >>>>> > >>>>> > >>>>> > >>>>> On 2021-05-21 05:25, Michael Picco wrote: > >>>>>> Hello, > >>>>>> > >>>>>> As mentioned earlier, it's now working. > >>>>>> I do not see the word 'marker' defined. Should it have been part > >>>>>> of > >>>>>> the basic system, or do I need to pull it from somewhere? > >>>>>> Then I'd like to see about doing something real simple, like > >>>>>> turning > >>>>>> an LED on/off. It's sort of a hardware person's approach to > >>>>>> 'Hello > >>>>>> World!' :) > >>>>>> > >>>>>> Kind regards, > >>>>>> > >>>>>> Michael > >>>>>> K6MLE > >>>>>> > >>>>>> > >>>>>> On 5/20/2021 12:41 PM, Michael Picco wrote: > >>>>>>> I should add the following changes to Craig Lindley's write-up: > >>>>>>> > >>>>>>> Step 3: > >>>>>>> Under Win10, the correct file location for avrasm2.exe will be: > >>>>>>> c:\Program > >>>>>>> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe > >>>>>>> > >>>>>>> Also needed in the work directory isatmega256.asm and > >>>>>>> m2560def.inc > >>>>>>> > >>>>>>> The image of the directory structure didn't post to the list, so > >>>>>>> I'm showing it below (my work directory is called > >>>>>>> "amforth-ATmega2560-6.9": > >>>>>>> > >>>>>>> -- appl > >>>>>>> -- arm > >>>>>>> -- avr8 > >>>>>>> -- common > >>>>>>> -- doc > >>>>>>> -- examples > >>>>>>> -- msp430 > >>>>>>> -- risc-v > >>>>>>> -- shared > >>>>>>> -- tests > >>>>>>> -- tools > >>>>>>> -- words > >>>>>>> atmega256.asm > >>>>>>> avrasm2.exe > >>>>>>> device.asm (for the 2560) > >>>>>>> device.inc (for the 2560) > >>>>>>> dict_appl.inc > >>>>>>> dict_appl_core.inc > >>>>>>> LICENSE.txt > >>>>>>> m2560def.inc > >>>>>>> make.bat > >>>>>>> readme.txt > >>>>>>> uno.asm > >>>>>>> > >>>>>>> Hope this helps! > >>>>>>> > >>>>>>> Kind regards, > >>>>>>> > >>>>>>> Michael > >>>>>>> K6MLE > >>>>>>> > >>>>>>> > >>>>>>> On 5/20/2021 11:56 AM, Michael Picco wrote: > >>>>>>>> Hello All! > >>>>>>>> > >>>>>>>> I have finally had success! > >>>>>>>> It turns out that the .eep and .hex files I was flashing into > >>>>>>>> the > >>>>>>>> 2560 were corrupted! > >>>>>>>> I followed Craig Lindley's write-up with modifications for the > >>>>>>>> 2560. > >>>>>>>> Changed the make.bat file to read: avrasm2.exe -fI -o > >>>>>>>> atmega2560.hex -e atmega2560.eep -l atmega2560.lst -I > >>>>>>>> g:\amforth-atmega2560\common -I g:\amforth-atmega2560\avr8 -I > >>>>>>>> g:\amforth-atmega2560\avr8\drivers -I include -v0 atmega256.asm > >>>>>>>> > >>>>>>>> This is the resulting file structure prior to executing > >>>>>>>> make.bat: > >>>>>>>> > >>>>>>>> The fuse setting in Studio 7 were set as follows: > >>>>>>>> E: 0xFF, H: 0xDC, L:0xFF > >>>>>>>> > >>>>>>>> Programmed the fuses; set the new files up in Studio 7 for flash > >>>>>>>> and EEPROM; programmed the .hex and .eep files. > >>>>>>>> > >>>>>>>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! > >>>>>>>> > >>>>>>>> I'm hoping this exercise might help others. > >>>>>>>> > >>>>>>>> Kind regards, > >>>>>>>> > >>>>>>>> Michael > >>>>>>>> K6MLE > >>>>>>>> > >>>>>>>> On 5/18/2021 8:51 AM, tristan wrote: > >>>>>>>>> Hello Michael, > >>>>>>>>> > >>>>>>>>> Getting AmForth up and running from archive hex files on a > >>>>>>>>> mega2560 is reasonably straightforward, however, I don't use > >>>>>>>>> Microchip Studio version 7 or win10 so I can't help with this > >>>>>>>>> tool set. I hope you able to translate the macos/linux to your > >>>>>>>>> tools - and if so a write-up would be very welcome! > >>>>>>>>> > >>>>>>>>> As pointed out you need a programmer (such as usbtiny, usbasp, > >>>>>>>>> avrisp2 etc.) and a program to talk to the programmer (such as > >>>>>>>>> avrdude). > >>>>>>>>> > >>>>>>>>> Both atmega2560.hex and atmega2560.eep.hex need to be written > >>>>>>>>> to > >>>>>>>>> the mega2560's flash/eeprom. Below are the command lines I use > >>>>>>>>> with avrdude > >>>>>>>>> > >>>>>>>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i > >>>>>>>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i > >>>>>>>>> > >>>>>>>>> Flashing these file will overwrite any existing bootloader. It > >>>>>>>>> is > >>>>>>>>> worth considering whether you are able to reverse this should > >>>>>>>>> you > >>>>>>>>> wish to, before flashing the above files. > >>>>>>>>> > >>>>>>>>> If your mega2560 is an Arduino style board, and the default > >>>>>>>>> fuses > >>>>>>>>> unchanged, then IIRC there is no need to reprogram the fuses. > >>>>>>>>> > >>>>>>>>> Once the files have been flashed, you should be able to connect > >>>>>>>>> to the mega2560 over serial using 38400 8N1. I use minicom and > >>>>>>>>> amforth-shell.py You will need to identify the name of the > >>>>>>>>> serial > >>>>>>>>> device created by the USB to SERIAL chip on your board/setup to > >>>>>>>>> use any serial program. > >>>>>>>>> > >>>>>>>>> Once connected you have the AmForth interpreter prompt and can > >>>>>>>>> interact, compile new words, and generally use the system. > >>>>>>>>> However, AmForth is modular and not all functionality is > >>>>>>>>> contained in the flashed hex files. For I2C and SPI new words > >>>>>>>>> need to be defined. These definitions are already available > >>>>>>>>> within the archive, but need to be loaded onto a "new" AmForth > >>>>>>>>> system. I find amforth-shell.py very helpful for automating > >>>>>>>>> this > >>>>>>>>> process. > >>>>>>>>> > >>>>>>>>> The cookbook is a great place to see examples of how things can > >>>>>>>>> be done > >>>>>>>>> > >>>>>>>>> http://amforth.sourceforge.net/TG/Cookbook.html > >>>>>>>>> > >>>>>>>>> And for I2C, below is very helpful > >>>>>>>>> > >>>>>>>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html > >>>>>>>>> > >>>>>>>>> Let us know how you get on. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Best wishes, > >>>>>>>>> Tristan > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> On 2021-05-18 14:31, BK Navarette wrote: > >>>>>>>>>> Be careful, the fuse settings particularly the boot size is > >>>>>>>>>> different > >>>>>>>>>> for flash forth vs amforth. > >>>>>>>>>> > >>>>>>>>>> Brian > >>>>>>>>>> > >>>>>>>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: > >>>>>>>>>>> Hello, > >>>>>>>>>>> I have not used Amforth > >>>>>>>>>>> But the installation mechanisms are the same as for > >>>>>>>>>>> FlashForth: > >>>>>>>>>>> > >>> > https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth > >>>>>>>>>>> once FORTH is installed, you must write the programs in FORTH > >>>>>>>>>>> language and > >>>>>>>>>>> have them compile by FORTH on the ARDUINO card. > >>>>>>>>>>> FORTH is an interpreter and a compiler. We communicate with > >>>>>>>>>>> FORTH via > >>>>>>>>>>> terminal software: > >>>>>>>>>>> > >>> > https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm > >>>>>>>>>>> Unless I'm mistaken, you need an MKII programmer, because you > >>>>>>>>>>> can only > >>>>>>>>>>> inject a .HEX file through this device. This operation > >>>>>>>>>>> overwrites the > >>>>>>>>>>> original bootloader. > >>>>>>>>>>> BR > >>>>>>>>>>> > >>>>>>>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco > >>>>>>>>>>> <mp...@pl...> a écrit : > >>>>>>>>>>> > >>>>>>>>>>>> Hello, > >>>>>>>>>>>> > >>>>>>>>>>>> I am attempting to use the mega2560 as a nicely featured > >>>>>>>>>>>> development > >>>>>>>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 > >>>>>>>>>>>> box, with > >>>>>>>>>>>> Microchip Studio version 7 installed. > >>>>>>>>>>>> > >>>>>>>>>>>> In the zip file, under appl/atmega2561, I notice > >>>>>>>>>>>> atmega256.eep.hex and > >>>>>>>>>>>> atmega256.hex. The eep.hex file doesn't seem to get > >>>>>>>>>>>> recognized by > >>>>>>>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? > >>>>>>>>>>>> > >>>>>>>>>>>> Can I start building the platform by flashing these files > >>>>>>>>>>>> into > >>>>>>>>>>>> the > >>>>>>>>>>>> board? If so, what is the process to add functionality > >>>>>>>>>>>> (I2C, > >>>>>>>>>>>> SPI, > >>>>>>>>>>>> etc.)? As a total newbie! > >>>>>>>>>>>> > >>>>>>>>>>>> If it's necessary to recompile and create new hex files, the > >>>>>>>>>>>> process is > >>>>>>>>>>>> unclear. Is it spelled out somewhere such that a beginner > >>>>>>>>>>>> can > >>>>>>>>>>>> follow > >>>>>>>>>>>> some basic steps to make the proper file(s)? > >>>>>>>>>>>> > >>>>>>>>>>>> It is my understanding that both flash and EEPROM need to be > >>>>>>>>>>>> written, > >>>>>>>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have > >>>>>>>>>>>> these correct? > >>>>>>>>>>>> > >>>>>>>>>>>> Once I get this figured out, I'd like to submit a write-up > >>>>>>>>>>>> for > >>>>>>>>>>>> newbies > >>>>>>>>>>>> and perhaps draw more users into AmForth. How might I get > >>>>>>>>>>>> this posted, > >>>>>>>>>>>> when completed? > >>>>>>>>>>>> > >>>>>>>>>>>> Thank you in advance! > >>>>>>>>>>>> > >>>>>>>>>>>> Kind regards, > >>>>>>>>>>>> > >>>>>>>>>>>> Michael > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>>>>>>> Amf...@li... > >>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>>>>>> Amf...@li... > >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>>>>>> > >>>>>>>>>> _______________________________________________ > >>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>>>>> Amf...@li... > >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>>>> Amf...@li... > >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>>>> > >>>>>>>> > >>>>>>>> _______________________________________________ > >>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>>> Amf...@li... > >>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>> Amf...@li... > >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>> > >>>>>> > >>>>>> > >>>>>> _______________________________________________ > >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>> Amf...@li... > >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>> > >>>>> _______________________________________________ > >>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>> Amf...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>> > >>>> _______________________________________________ > >>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>> Amf...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>> > >>> > >>> > >>> _______________________________________________ > >>> Amforth-devel mailing list for http://amforth.sf.net/ > >>> Amf...@li... > >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>> > >> _______________________________________________ > >> Amforth-devel mailing list for http://amforth.sf.net/ > >> Amf...@li... > >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > > > > > > _______________________________________________ > > Amforth-devel mailing list for http://amforth.sf.net/ > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: tristan <ho...@tj...> - 2021-05-24 08:47:12
|
Hi Michael, AmForth uses a dictionary to store the words it knows about. When AmForth recognises it has received a word over the serial line it tries to lookup that word in its dictionary. If it finds the word, it executes that word. If it does not, then it reports an error. In the file marker.frt is the definition for the word marker. This word will create a word that will manipulate the dictionary. See this link below http://amforth.sourceforge.net/TG/recipes/Forget.html Your AmForth system is indeed corrupted (and will need to be re-flashed). Why it has become corrupted needs some more investigation. Perhaps there is a word that marker relies on that is missing from your hex build, perhaps you made a typo when typing in the definition, perhaps you have found a bug[a]. I would 1. Re-flash the board 2. Connect over serial, check that word lists the dictionary, define a trivial word e.g. : xx 1 + ; and check that it works and can be listed in the dictionary. 3. Use amforth-shell.py to load avr8/lib/forth2012/core-ext/marker.frt 4. Repeat 2. 5. Do the example in http://amforth.sourceforge.net/TG/recipes/Forget.html Best wishes, Tristan [a] I use marker very frequently on atmega328p but not on the atmega2560 On 2021-05-24 00:02, Michael Picco wrote: > Thank you for that. > Reading up on them yields: > not found ... the position in the input line indicates the system > choked on the word 'words'. > > words is part of the flashed system. > > This indicates (to me) that something got corrupted. I can only > wonder if memory got overwritten somehow. Is there a setting required > prior to flashing that I'm failing to set properly? > > Thanks in advance! > > On 5/22/2021 9:51 PM, George Herzog wrote: >> There are AmForth error codes. Read up on them. >> >> On Sun, May 23, 2021, 12:42 Michael Picco <mp...@pl...> >> wrote: >> >>> Hello! >>> >>> I seem to have stumbled across an issue. >>> >>> First code I wrote was to blink the LED onboard. This worked just >>> fine. >>> Then I went to add 'marker'. Entered it line-by-line ... got the >>> 'Ok' >>> after each line. After adding the last line (semicolon), the board >>> froze up. Did a warm boot and then executed 'words' to see what was >>> there. It came back with ?? -13 5. >>> >>> What came to mind is perhaps not enough memory is allocated prior to >>> flashing and I'm overwriting something I shouldn't. >>> >>> Any ideas? >>> >>> Kind regards, >>> >>> Michael >>> >>> On 5/21/2021 1:28 AM, tristan wrote: >>>> Hi Michael, >>>> >>>> Apologies. My memory is failing me. >>>> >>>> The LED is on D13 for both UNO and MEGA, but D13 is mapped to PB5 >>>> (PORTB bit 5) on the UNO and PB7 (PORTB bit 7) on the MEGA. >>>> >>>> Best wishes, >>>> Tristan >>>> >>>> >>>> On 2021-05-21 08:54, tristan wrote: >>>>> Hi Michael, >>>>> >>>>>> I do not see the word 'marker' defined. Should it have been part >>>>>> of >>>>>> the basic system, or do I need to pull it from somewhere? >>>>> It is not part of the basic system, it is defined in this file. >>>>> >>>>> avr8/lib/forth2012/core-ext/marker.frt >>>>> >>>>> Using marker is efficient/good practice/etc. but it is not a >>>>> necessary >>>>> requirement to do below. >>>>> >>>>>> Then I'd like to see about doing something real simple, like >>>>>> turning >>>>>> an LED on/off. It's sort of a hardware person's approach to >>>>>> 'Hello >>>>>> World!' :) >>>>> http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html >>>>> >>>>> IIRC the MEGA and UNO have the built-in led on the same pin (port >>>>> bit). >>>>> >>>>> The definitions for the chip can be found in this file >>>>> >>>>> avr8/devices/atmega2560/atmega2560.frt >>>>> >>>>> These, or extracts from, will need to be loaded into the basic >>>>> system. >>>>> So longer term, being able to load forth definition >>>>> non-interactively >>>>> from a file is very useful. There are programs in the tools >>>>> directory >>>>> - amforth-shell.py being the one I use. >>>>> >>>>> >>>>> Best wishes, >>>>> Tristan >>>>> >>>>> >>>>> >>>>> On 2021-05-21 05:25, Michael Picco wrote: >>>>>> Hello, >>>>>> >>>>>> As mentioned earlier, it's now working. >>>>>> I do not see the word 'marker' defined. Should it have been part >>>>>> of >>>>>> the basic system, or do I need to pull it from somewhere? >>>>>> Then I'd like to see about doing something real simple, like >>>>>> turning >>>>>> an LED on/off. It's sort of a hardware person's approach to >>>>>> 'Hello >>>>>> World!' :) >>>>>> >>>>>> Kind regards, >>>>>> >>>>>> Michael >>>>>> K6MLE >>>>>> >>>>>> >>>>>> On 5/20/2021 12:41 PM, Michael Picco wrote: >>>>>>> I should add the following changes to Craig Lindley's write-up: >>>>>>> >>>>>>> Step 3: >>>>>>> Under Win10, the correct file location for avrasm2.exe will be: >>>>>>> c:\Program >>>>>>> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe >>>>>>> >>>>>>> Also needed in the work directory isatmega256.asm and >>>>>>> m2560def.inc >>>>>>> >>>>>>> The image of the directory structure didn't post to the list, so >>>>>>> I'm showing it below (my work directory is called >>>>>>> "amforth-ATmega2560-6.9": >>>>>>> >>>>>>> -- appl >>>>>>> -- arm >>>>>>> -- avr8 >>>>>>> -- common >>>>>>> -- doc >>>>>>> -- examples >>>>>>> -- msp430 >>>>>>> -- risc-v >>>>>>> -- shared >>>>>>> -- tests >>>>>>> -- tools >>>>>>> -- words >>>>>>> atmega256.asm >>>>>>> avrasm2.exe >>>>>>> device.asm (for the 2560) >>>>>>> device.inc (for the 2560) >>>>>>> dict_appl.inc >>>>>>> dict_appl_core.inc >>>>>>> LICENSE.txt >>>>>>> m2560def.inc >>>>>>> make.bat >>>>>>> readme.txt >>>>>>> uno.asm >>>>>>> >>>>>>> Hope this helps! >>>>>>> >>>>>>> Kind regards, >>>>>>> >>>>>>> Michael >>>>>>> K6MLE >>>>>>> >>>>>>> >>>>>>> On 5/20/2021 11:56 AM, Michael Picco wrote: >>>>>>>> Hello All! >>>>>>>> >>>>>>>> I have finally had success! >>>>>>>> It turns out that the .eep and .hex files I was flashing into >>>>>>>> the >>>>>>>> 2560 were corrupted! >>>>>>>> I followed Craig Lindley's write-up with modifications for the >>>>>>>> 2560. >>>>>>>> Changed the make.bat file to read: avrasm2.exe -fI -o >>>>>>>> atmega2560.hex -e atmega2560.eep -l atmega2560.lst -I >>>>>>>> g:\amforth-atmega2560\common -I g:\amforth-atmega2560\avr8 -I >>>>>>>> g:\amforth-atmega2560\avr8\drivers -I include -v0 atmega256.asm >>>>>>>> >>>>>>>> This is the resulting file structure prior to executing >>>>>>>> make.bat: >>>>>>>> >>>>>>>> The fuse setting in Studio 7 were set as follows: >>>>>>>> E: 0xFF, H: 0xDC, L:0xFF >>>>>>>> >>>>>>>> Programmed the fuses; set the new files up in Studio 7 for flash >>>>>>>> and EEPROM; programmed the .hex and .eep files. >>>>>>>> >>>>>>>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! >>>>>>>> >>>>>>>> I'm hoping this exercise might help others. >>>>>>>> >>>>>>>> Kind regards, >>>>>>>> >>>>>>>> Michael >>>>>>>> K6MLE >>>>>>>> >>>>>>>> On 5/18/2021 8:51 AM, tristan wrote: >>>>>>>>> Hello Michael, >>>>>>>>> >>>>>>>>> Getting AmForth up and running from archive hex files on a >>>>>>>>> mega2560 is reasonably straightforward, however, I don't use >>>>>>>>> Microchip Studio version 7 or win10 so I can't help with this >>>>>>>>> tool set. I hope you able to translate the macos/linux to your >>>>>>>>> tools - and if so a write-up would be very welcome! >>>>>>>>> >>>>>>>>> As pointed out you need a programmer (such as usbtiny, usbasp, >>>>>>>>> avrisp2 etc.) and a program to talk to the programmer (such as >>>>>>>>> avrdude). >>>>>>>>> >>>>>>>>> Both atmega2560.hex and atmega2560.eep.hex need to be written >>>>>>>>> to >>>>>>>>> the mega2560's flash/eeprom. Below are the command lines I use >>>>>>>>> with avrdude >>>>>>>>> >>>>>>>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >>>>>>>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >>>>>>>>> >>>>>>>>> Flashing these file will overwrite any existing bootloader. It >>>>>>>>> is >>>>>>>>> worth considering whether you are able to reverse this should >>>>>>>>> you >>>>>>>>> wish to, before flashing the above files. >>>>>>>>> >>>>>>>>> If your mega2560 is an Arduino style board, and the default >>>>>>>>> fuses >>>>>>>>> unchanged, then IIRC there is no need to reprogram the fuses. >>>>>>>>> >>>>>>>>> Once the files have been flashed, you should be able to connect >>>>>>>>> to the mega2560 over serial using 38400 8N1. I use minicom and >>>>>>>>> amforth-shell.py You will need to identify the name of the >>>>>>>>> serial >>>>>>>>> device created by the USB to SERIAL chip on your board/setup to >>>>>>>>> use any serial program. >>>>>>>>> >>>>>>>>> Once connected you have the AmForth interpreter prompt and can >>>>>>>>> interact, compile new words, and generally use the system. >>>>>>>>> However, AmForth is modular and not all functionality is >>>>>>>>> contained in the flashed hex files. For I2C and SPI new words >>>>>>>>> need to be defined. These definitions are already available >>>>>>>>> within the archive, but need to be loaded onto a "new" AmForth >>>>>>>>> system. I find amforth-shell.py very helpful for automating >>>>>>>>> this >>>>>>>>> process. >>>>>>>>> >>>>>>>>> The cookbook is a great place to see examples of how things can >>>>>>>>> be done >>>>>>>>> >>>>>>>>> http://amforth.sourceforge.net/TG/Cookbook.html >>>>>>>>> >>>>>>>>> And for I2C, below is very helpful >>>>>>>>> >>>>>>>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >>>>>>>>> >>>>>>>>> Let us know how you get on. >>>>>>>>> >>>>>>>>> >>>>>>>>> Best wishes, >>>>>>>>> Tristan >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 2021-05-18 14:31, BK Navarette wrote: >>>>>>>>>> Be careful, the fuse settings particularly the boot size is >>>>>>>>>> different >>>>>>>>>> for flash forth vs amforth. >>>>>>>>>> >>>>>>>>>> Brian >>>>>>>>>> >>>>>>>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>>>>>>>>> Hello, >>>>>>>>>>> I have not used Amforth >>>>>>>>>>> But the installation mechanisms are the same as for >>>>>>>>>>> FlashForth: >>>>>>>>>>> >>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>>>>>>>>> once FORTH is installed, you must write the programs in FORTH >>>>>>>>>>> language and >>>>>>>>>>> have them compile by FORTH on the ARDUINO card. >>>>>>>>>>> FORTH is an interpreter and a compiler. We communicate with >>>>>>>>>>> FORTH via >>>>>>>>>>> terminal software: >>>>>>>>>>> >>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>>>>>>>>> Unless I'm mistaken, you need an MKII programmer, because you >>>>>>>>>>> can only >>>>>>>>>>> inject a .HEX file through this device. This operation >>>>>>>>>>> overwrites the >>>>>>>>>>> original bootloader. >>>>>>>>>>> BR >>>>>>>>>>> >>>>>>>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco >>>>>>>>>>> <mp...@pl...> a écrit : >>>>>>>>>>> >>>>>>>>>>>> Hello, >>>>>>>>>>>> >>>>>>>>>>>> I am attempting to use the mega2560 as a nicely featured >>>>>>>>>>>> development >>>>>>>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 >>>>>>>>>>>> box, with >>>>>>>>>>>> Microchip Studio version 7 installed. >>>>>>>>>>>> >>>>>>>>>>>> In the zip file, under appl/atmega2561, I notice >>>>>>>>>>>> atmega256.eep.hex and >>>>>>>>>>>> atmega256.hex. The eep.hex file doesn't seem to get >>>>>>>>>>>> recognized by >>>>>>>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>>>>>>>>> >>>>>>>>>>>> Can I start building the platform by flashing these files >>>>>>>>>>>> into >>>>>>>>>>>> the >>>>>>>>>>>> board? If so, what is the process to add functionality >>>>>>>>>>>> (I2C, >>>>>>>>>>>> SPI, >>>>>>>>>>>> etc.)? As a total newbie! >>>>>>>>>>>> >>>>>>>>>>>> If it's necessary to recompile and create new hex files, the >>>>>>>>>>>> process is >>>>>>>>>>>> unclear. Is it spelled out somewhere such that a beginner >>>>>>>>>>>> can >>>>>>>>>>>> follow >>>>>>>>>>>> some basic steps to make the proper file(s)? >>>>>>>>>>>> >>>>>>>>>>>> It is my understanding that both flash and EEPROM need to be >>>>>>>>>>>> written, >>>>>>>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have >>>>>>>>>>>> these correct? >>>>>>>>>>>> >>>>>>>>>>>> Once I get this figured out, I'd like to submit a write-up >>>>>>>>>>>> for >>>>>>>>>>>> newbies >>>>>>>>>>>> and perhaps draw more users into AmForth. How might I get >>>>>>>>>>>> this posted, >>>>>>>>>>>> when completed? >>>>>>>>>>>> >>>>>>>>>>>> Thank you in advance! >>>>>>>>>>>> >>>>>>>>>>>> Kind regards, >>>>>>>>>>>> >>>>>>>>>>>> Michael >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>>>> Amf...@li... >>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>>> Amf...@li... >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>> Amf...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>> Amf...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>> Amf...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>> Amf...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>> Amf...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Michael P. <mp...@pl...> - 2021-05-23 23:02:54
|
Thank you for that. Reading up on them yields: not found ... the position in the input line indicates the system choked on the word 'words'. words is part of the flashed system. This indicates (to me) that something got corrupted. I can only wonder if memory got overwritten somehow. Is there a setting required prior to flashing that I'm failing to set properly? Thanks in advance! On 5/22/2021 9:51 PM, George Herzog wrote: > There are AmForth error codes. Read up on them. > > On Sun, May 23, 2021, 12:42 Michael Picco <mp...@pl...> wrote: > >> Hello! >> >> I seem to have stumbled across an issue. >> >> First code I wrote was to blink the LED onboard. This worked just fine. >> Then I went to add 'marker'. Entered it line-by-line ... got the 'Ok' >> after each line. After adding the last line (semicolon), the board >> froze up. Did a warm boot and then executed 'words' to see what was >> there. It came back with ?? -13 5. >> >> What came to mind is perhaps not enough memory is allocated prior to >> flashing and I'm overwriting something I shouldn't. >> >> Any ideas? >> >> Kind regards, >> >> Michael >> >> On 5/21/2021 1:28 AM, tristan wrote: >>> Hi Michael, >>> >>> Apologies. My memory is failing me. >>> >>> The LED is on D13 for both UNO and MEGA, but D13 is mapped to PB5 >>> (PORTB bit 5) on the UNO and PB7 (PORTB bit 7) on the MEGA. >>> >>> Best wishes, >>> Tristan >>> >>> >>> On 2021-05-21 08:54, tristan wrote: >>>> Hi Michael, >>>> >>>>> I do not see the word 'marker' defined. Should it have been part of >>>>> the basic system, or do I need to pull it from somewhere? >>>> It is not part of the basic system, it is defined in this file. >>>> >>>> avr8/lib/forth2012/core-ext/marker.frt >>>> >>>> Using marker is efficient/good practice/etc. but it is not a necessary >>>> requirement to do below. >>>> >>>>> Then I'd like to see about doing something real simple, like turning >>>>> an LED on/off. It's sort of a hardware person's approach to 'Hello >>>>> World!' :) >>>> http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html >>>> >>>> IIRC the MEGA and UNO have the built-in led on the same pin (port bit). >>>> >>>> The definitions for the chip can be found in this file >>>> >>>> avr8/devices/atmega2560/atmega2560.frt >>>> >>>> These, or extracts from, will need to be loaded into the basic system. >>>> So longer term, being able to load forth definition non-interactively >>>> from a file is very useful. There are programs in the tools directory >>>> - amforth-shell.py being the one I use. >>>> >>>> >>>> Best wishes, >>>> Tristan >>>> >>>> >>>> >>>> On 2021-05-21 05:25, Michael Picco wrote: >>>>> Hello, >>>>> >>>>> As mentioned earlier, it's now working. >>>>> I do not see the word 'marker' defined. Should it have been part of >>>>> the basic system, or do I need to pull it from somewhere? >>>>> Then I'd like to see about doing something real simple, like turning >>>>> an LED on/off. It's sort of a hardware person's approach to 'Hello >>>>> World!' :) >>>>> >>>>> Kind regards, >>>>> >>>>> Michael >>>>> K6MLE >>>>> >>>>> >>>>> On 5/20/2021 12:41 PM, Michael Picco wrote: >>>>>> I should add the following changes to Craig Lindley's write-up: >>>>>> >>>>>> Step 3: >>>>>> Under Win10, the correct file location for avrasm2.exe will be: >>>>>> c:\Program >>>>>> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe >>>>>> >>>>>> Also needed in the work directory isatmega256.asm and m2560def.inc >>>>>> >>>>>> The image of the directory structure didn't post to the list, so >>>>>> I'm showing it below (my work directory is called >>>>>> "amforth-ATmega2560-6.9": >>>>>> >>>>>> -- appl >>>>>> -- arm >>>>>> -- avr8 >>>>>> -- common >>>>>> -- doc >>>>>> -- examples >>>>>> -- msp430 >>>>>> -- risc-v >>>>>> -- shared >>>>>> -- tests >>>>>> -- tools >>>>>> -- words >>>>>> atmega256.asm >>>>>> avrasm2.exe >>>>>> device.asm (for the 2560) >>>>>> device.inc (for the 2560) >>>>>> dict_appl.inc >>>>>> dict_appl_core.inc >>>>>> LICENSE.txt >>>>>> m2560def.inc >>>>>> make.bat >>>>>> readme.txt >>>>>> uno.asm >>>>>> >>>>>> Hope this helps! >>>>>> >>>>>> Kind regards, >>>>>> >>>>>> Michael >>>>>> K6MLE >>>>>> >>>>>> >>>>>> On 5/20/2021 11:56 AM, Michael Picco wrote: >>>>>>> Hello All! >>>>>>> >>>>>>> I have finally had success! >>>>>>> It turns out that the .eep and .hex files I was flashing into the >>>>>>> 2560 were corrupted! >>>>>>> I followed Craig Lindley's write-up with modifications for the 2560. >>>>>>> Changed the make.bat file to read: avrasm2.exe -fI -o >>>>>>> atmega2560.hex -e atmega2560.eep -l atmega2560.lst -I >>>>>>> g:\amforth-atmega2560\common -I g:\amforth-atmega2560\avr8 -I >>>>>>> g:\amforth-atmega2560\avr8\drivers -I include -v0 atmega256.asm >>>>>>> >>>>>>> This is the resulting file structure prior to executing make.bat: >>>>>>> >>>>>>> The fuse setting in Studio 7 were set as follows: >>>>>>> E: 0xFF, H: 0xDC, L:0xFF >>>>>>> >>>>>>> Programmed the fuses; set the new files up in Studio 7 for flash >>>>>>> and EEPROM; programmed the .hex and .eep files. >>>>>>> >>>>>>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! >>>>>>> >>>>>>> I'm hoping this exercise might help others. >>>>>>> >>>>>>> Kind regards, >>>>>>> >>>>>>> Michael >>>>>>> K6MLE >>>>>>> >>>>>>> On 5/18/2021 8:51 AM, tristan wrote: >>>>>>>> Hello Michael, >>>>>>>> >>>>>>>> Getting AmForth up and running from archive hex files on a >>>>>>>> mega2560 is reasonably straightforward, however, I don't use >>>>>>>> Microchip Studio version 7 or win10 so I can't help with this >>>>>>>> tool set. I hope you able to translate the macos/linux to your >>>>>>>> tools - and if so a write-up would be very welcome! >>>>>>>> >>>>>>>> As pointed out you need a programmer (such as usbtiny, usbasp, >>>>>>>> avrisp2 etc.) and a program to talk to the programmer (such as >>>>>>>> avrdude). >>>>>>>> >>>>>>>> Both atmega2560.hex and atmega2560.eep.hex need to be written to >>>>>>>> the mega2560's flash/eeprom. Below are the command lines I use >>>>>>>> with avrdude >>>>>>>> >>>>>>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >>>>>>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >>>>>>>> >>>>>>>> Flashing these file will overwrite any existing bootloader. It is >>>>>>>> worth considering whether you are able to reverse this should you >>>>>>>> wish to, before flashing the above files. >>>>>>>> >>>>>>>> If your mega2560 is an Arduino style board, and the default fuses >>>>>>>> unchanged, then IIRC there is no need to reprogram the fuses. >>>>>>>> >>>>>>>> Once the files have been flashed, you should be able to connect >>>>>>>> to the mega2560 over serial using 38400 8N1. I use minicom and >>>>>>>> amforth-shell.py You will need to identify the name of the serial >>>>>>>> device created by the USB to SERIAL chip on your board/setup to >>>>>>>> use any serial program. >>>>>>>> >>>>>>>> Once connected you have the AmForth interpreter prompt and can >>>>>>>> interact, compile new words, and generally use the system. >>>>>>>> However, AmForth is modular and not all functionality is >>>>>>>> contained in the flashed hex files. For I2C and SPI new words >>>>>>>> need to be defined. These definitions are already available >>>>>>>> within the archive, but need to be loaded onto a "new" AmForth >>>>>>>> system. I find amforth-shell.py very helpful for automating this >>>>>>>> process. >>>>>>>> >>>>>>>> The cookbook is a great place to see examples of how things can >>>>>>>> be done >>>>>>>> >>>>>>>> http://amforth.sourceforge.net/TG/Cookbook.html >>>>>>>> >>>>>>>> And for I2C, below is very helpful >>>>>>>> >>>>>>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >>>>>>>> >>>>>>>> Let us know how you get on. >>>>>>>> >>>>>>>> >>>>>>>> Best wishes, >>>>>>>> Tristan >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 2021-05-18 14:31, BK Navarette wrote: >>>>>>>>> Be careful, the fuse settings particularly the boot size is >>>>>>>>> different >>>>>>>>> for flash forth vs amforth. >>>>>>>>> >>>>>>>>> Brian >>>>>>>>> >>>>>>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>>>>>>>> Hello, >>>>>>>>>> I have not used Amforth >>>>>>>>>> But the installation mechanisms are the same as for FlashForth: >>>>>>>>>> >> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>>>>>>>> once FORTH is installed, you must write the programs in FORTH >>>>>>>>>> language and >>>>>>>>>> have them compile by FORTH on the ARDUINO card. >>>>>>>>>> FORTH is an interpreter and a compiler. We communicate with >>>>>>>>>> FORTH via >>>>>>>>>> terminal software: >>>>>>>>>> >> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>>>>>>>> Unless I'm mistaken, you need an MKII programmer, because you >>>>>>>>>> can only >>>>>>>>>> inject a .HEX file through this device. This operation >>>>>>>>>> overwrites the >>>>>>>>>> original bootloader. >>>>>>>>>> BR >>>>>>>>>> >>>>>>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco >>>>>>>>>> <mp...@pl...> a écrit : >>>>>>>>>> >>>>>>>>>>> Hello, >>>>>>>>>>> >>>>>>>>>>> I am attempting to use the mega2560 as a nicely featured >>>>>>>>>>> development >>>>>>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 >>>>>>>>>>> box, with >>>>>>>>>>> Microchip Studio version 7 installed. >>>>>>>>>>> >>>>>>>>>>> In the zip file, under appl/atmega2561, I notice >>>>>>>>>>> atmega256.eep.hex and >>>>>>>>>>> atmega256.hex. The eep.hex file doesn't seem to get >>>>>>>>>>> recognized by >>>>>>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>>>>>>>> >>>>>>>>>>> Can I start building the platform by flashing these files into >>>>>>>>>>> the >>>>>>>>>>> board? If so, what is the process to add functionality (I2C, >>>>>>>>>>> SPI, >>>>>>>>>>> etc.)? As a total newbie! >>>>>>>>>>> >>>>>>>>>>> If it's necessary to recompile and create new hex files, the >>>>>>>>>>> process is >>>>>>>>>>> unclear. Is it spelled out somewhere such that a beginner can >>>>>>>>>>> follow >>>>>>>>>>> some basic steps to make the proper file(s)? >>>>>>>>>>> >>>>>>>>>>> It is my understanding that both flash and EEPROM need to be >>>>>>>>>>> written, >>>>>>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have >>>>>>>>>>> these correct? >>>>>>>>>>> >>>>>>>>>>> Once I get this figured out, I'd like to submit a write-up for >>>>>>>>>>> newbies >>>>>>>>>>> and perhaps draw more users into AmForth. How might I get >>>>>>>>>>> this posted, >>>>>>>>>>> when completed? >>>>>>>>>>> >>>>>>>>>>> Thank you in advance! >>>>>>>>>>> >>>>>>>>>>> Kind regards, >>>>>>>>>>> >>>>>>>>>>> Michael >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>>> Amf...@li... >>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>>> Amf...@li... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>> Amf...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>> Amf...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>> Amf...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>> Amf...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: George H. <jac...@gm...> - 2021-05-23 04:52:12
|
There are AmForth error codes. Read up on them. On Sun, May 23, 2021, 12:42 Michael Picco <mp...@pl...> wrote: > Hello! > > I seem to have stumbled across an issue. > > First code I wrote was to blink the LED onboard. This worked just fine. > Then I went to add 'marker'. Entered it line-by-line ... got the 'Ok' > after each line. After adding the last line (semicolon), the board > froze up. Did a warm boot and then executed 'words' to see what was > there. It came back with ?? -13 5. > > What came to mind is perhaps not enough memory is allocated prior to > flashing and I'm overwriting something I shouldn't. > > Any ideas? > > Kind regards, > > Michael > > On 5/21/2021 1:28 AM, tristan wrote: > > Hi Michael, > > > > Apologies. My memory is failing me. > > > > The LED is on D13 for both UNO and MEGA, but D13 is mapped to PB5 > > (PORTB bit 5) on the UNO and PB7 (PORTB bit 7) on the MEGA. > > > > Best wishes, > > Tristan > > > > > > On 2021-05-21 08:54, tristan wrote: > >> Hi Michael, > >> > >>> I do not see the word 'marker' defined. Should it have been part of > >>> the basic system, or do I need to pull it from somewhere? > >> > >> It is not part of the basic system, it is defined in this file. > >> > >> avr8/lib/forth2012/core-ext/marker.frt > >> > >> Using marker is efficient/good practice/etc. but it is not a necessary > >> requirement to do below. > >> > >>> Then I'd like to see about doing something real simple, like turning > >>> an LED on/off. It's sort of a hardware person's approach to 'Hello > >>> World!' :) > >> > >> http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html > >> > >> IIRC the MEGA and UNO have the built-in led on the same pin (port bit). > >> > >> The definitions for the chip can be found in this file > >> > >> avr8/devices/atmega2560/atmega2560.frt > >> > >> These, or extracts from, will need to be loaded into the basic system. > >> So longer term, being able to load forth definition non-interactively > >> from a file is very useful. There are programs in the tools directory > >> - amforth-shell.py being the one I use. > >> > >> > >> Best wishes, > >> Tristan > >> > >> > >> > >> On 2021-05-21 05:25, Michael Picco wrote: > >>> Hello, > >>> > >>> As mentioned earlier, it's now working. > >>> I do not see the word 'marker' defined. Should it have been part of > >>> the basic system, or do I need to pull it from somewhere? > >>> Then I'd like to see about doing something real simple, like turning > >>> an LED on/off. It's sort of a hardware person's approach to 'Hello > >>> World!' :) > >>> > >>> Kind regards, > >>> > >>> Michael > >>> K6MLE > >>> > >>> > >>> On 5/20/2021 12:41 PM, Michael Picco wrote: > >>>> I should add the following changes to Craig Lindley's write-up: > >>>> > >>>> Step 3: > >>>> Under Win10, the correct file location for avrasm2.exe will be: > >>>> c:\Program > >>>> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe > >>>> > >>>> Also needed in the work directory isatmega256.asm and m2560def.inc > >>>> > >>>> The image of the directory structure didn't post to the list, so > >>>> I'm showing it below (my work directory is called > >>>> "amforth-ATmega2560-6.9": > >>>> > >>>> -- appl > >>>> -- arm > >>>> -- avr8 > >>>> -- common > >>>> -- doc > >>>> -- examples > >>>> -- msp430 > >>>> -- risc-v > >>>> -- shared > >>>> -- tests > >>>> -- tools > >>>> -- words > >>>> atmega256.asm > >>>> avrasm2.exe > >>>> device.asm (for the 2560) > >>>> device.inc (for the 2560) > >>>> dict_appl.inc > >>>> dict_appl_core.inc > >>>> LICENSE.txt > >>>> m2560def.inc > >>>> make.bat > >>>> readme.txt > >>>> uno.asm > >>>> > >>>> Hope this helps! > >>>> > >>>> Kind regards, > >>>> > >>>> Michael > >>>> K6MLE > >>>> > >>>> > >>>> On 5/20/2021 11:56 AM, Michael Picco wrote: > >>>>> Hello All! > >>>>> > >>>>> I have finally had success! > >>>>> It turns out that the .eep and .hex files I was flashing into the > >>>>> 2560 were corrupted! > >>>>> I followed Craig Lindley's write-up with modifications for the 2560. > >>>>> Changed the make.bat file to read: avrasm2.exe -fI -o > >>>>> atmega2560.hex -e atmega2560.eep -l atmega2560.lst -I > >>>>> g:\amforth-atmega2560\common -I g:\amforth-atmega2560\avr8 -I > >>>>> g:\amforth-atmega2560\avr8\drivers -I include -v0 atmega256.asm > >>>>> > >>>>> This is the resulting file structure prior to executing make.bat: > >>>>> > >>>>> The fuse setting in Studio 7 were set as follows: > >>>>> E: 0xFF, H: 0xDC, L:0xFF > >>>>> > >>>>> Programmed the fuses; set the new files up in Studio 7 for flash > >>>>> and EEPROM; programmed the .hex and .eep files. > >>>>> > >>>>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! > >>>>> > >>>>> I'm hoping this exercise might help others. > >>>>> > >>>>> Kind regards, > >>>>> > >>>>> Michael > >>>>> K6MLE > >>>>> > >>>>> On 5/18/2021 8:51 AM, tristan wrote: > >>>>>> Hello Michael, > >>>>>> > >>>>>> Getting AmForth up and running from archive hex files on a > >>>>>> mega2560 is reasonably straightforward, however, I don't use > >>>>>> Microchip Studio version 7 or win10 so I can't help with this > >>>>>> tool set. I hope you able to translate the macos/linux to your > >>>>>> tools - and if so a write-up would be very welcome! > >>>>>> > >>>>>> As pointed out you need a programmer (such as usbtiny, usbasp, > >>>>>> avrisp2 etc.) and a program to talk to the programmer (such as > >>>>>> avrdude). > >>>>>> > >>>>>> Both atmega2560.hex and atmega2560.eep.hex need to be written to > >>>>>> the mega2560's flash/eeprom. Below are the command lines I use > >>>>>> with avrdude > >>>>>> > >>>>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i > >>>>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i > >>>>>> > >>>>>> Flashing these file will overwrite any existing bootloader. It is > >>>>>> worth considering whether you are able to reverse this should you > >>>>>> wish to, before flashing the above files. > >>>>>> > >>>>>> If your mega2560 is an Arduino style board, and the default fuses > >>>>>> unchanged, then IIRC there is no need to reprogram the fuses. > >>>>>> > >>>>>> Once the files have been flashed, you should be able to connect > >>>>>> to the mega2560 over serial using 38400 8N1. I use minicom and > >>>>>> amforth-shell.py You will need to identify the name of the serial > >>>>>> device created by the USB to SERIAL chip on your board/setup to > >>>>>> use any serial program. > >>>>>> > >>>>>> Once connected you have the AmForth interpreter prompt and can > >>>>>> interact, compile new words, and generally use the system. > >>>>>> However, AmForth is modular and not all functionality is > >>>>>> contained in the flashed hex files. For I2C and SPI new words > >>>>>> need to be defined. These definitions are already available > >>>>>> within the archive, but need to be loaded onto a "new" AmForth > >>>>>> system. I find amforth-shell.py very helpful for automating this > >>>>>> process. > >>>>>> > >>>>>> The cookbook is a great place to see examples of how things can > >>>>>> be done > >>>>>> > >>>>>> http://amforth.sourceforge.net/TG/Cookbook.html > >>>>>> > >>>>>> And for I2C, below is very helpful > >>>>>> > >>>>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html > >>>>>> > >>>>>> Let us know how you get on. > >>>>>> > >>>>>> > >>>>>> Best wishes, > >>>>>> Tristan > >>>>>> > >>>>>> > >>>>>> > >>>>>> On 2021-05-18 14:31, BK Navarette wrote: > >>>>>>> Be careful, the fuse settings particularly the boot size is > >>>>>>> different > >>>>>>> for flash forth vs amforth. > >>>>>>> > >>>>>>> Brian > >>>>>>> > >>>>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: > >>>>>>>> Hello, > >>>>>>>> I have not used Amforth > >>>>>>>> But the installation mechanisms are the same as for FlashForth: > >>>>>>>> > https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth > >>>>>>>> once FORTH is installed, you must write the programs in FORTH > >>>>>>>> language and > >>>>>>>> have them compile by FORTH on the ARDUINO card. > >>>>>>>> FORTH is an interpreter and a compiler. We communicate with > >>>>>>>> FORTH via > >>>>>>>> terminal software: > >>>>>>>> > https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm > >>>>>>>> Unless I'm mistaken, you need an MKII programmer, because you > >>>>>>>> can only > >>>>>>>> inject a .HEX file through this device. This operation > >>>>>>>> overwrites the > >>>>>>>> original bootloader. > >>>>>>>> BR > >>>>>>>> > >>>>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco > >>>>>>>> <mp...@pl...> a écrit : > >>>>>>>> > >>>>>>>>> Hello, > >>>>>>>>> > >>>>>>>>> I am attempting to use the mega2560 as a nicely featured > >>>>>>>>> development > >>>>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 > >>>>>>>>> box, with > >>>>>>>>> Microchip Studio version 7 installed. > >>>>>>>>> > >>>>>>>>> In the zip file, under appl/atmega2561, I notice > >>>>>>>>> atmega256.eep.hex and > >>>>>>>>> atmega256.hex. The eep.hex file doesn't seem to get > >>>>>>>>> recognized by > >>>>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? > >>>>>>>>> > >>>>>>>>> Can I start building the platform by flashing these files into > >>>>>>>>> the > >>>>>>>>> board? If so, what is the process to add functionality (I2C, > >>>>>>>>> SPI, > >>>>>>>>> etc.)? As a total newbie! > >>>>>>>>> > >>>>>>>>> If it's necessary to recompile and create new hex files, the > >>>>>>>>> process is > >>>>>>>>> unclear. Is it spelled out somewhere such that a beginner can > >>>>>>>>> follow > >>>>>>>>> some basic steps to make the proper file(s)? > >>>>>>>>> > >>>>>>>>> It is my understanding that both flash and EEPROM need to be > >>>>>>>>> written, > >>>>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have > >>>>>>>>> these correct? > >>>>>>>>> > >>>>>>>>> Once I get this figured out, I'd like to submit a write-up for > >>>>>>>>> newbies > >>>>>>>>> and perhaps draw more users into AmForth. How might I get > >>>>>>>>> this posted, > >>>>>>>>> when completed? > >>>>>>>>> > >>>>>>>>> Thank you in advance! > >>>>>>>>> > >>>>>>>>> Kind regards, > >>>>>>>>> > >>>>>>>>> Michael > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>>>> Amf...@li... > >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>>>>> > >>>>>>>> _______________________________________________ > >>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>>> Amf...@li... > >>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>>> Amf...@li... > >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>>> > >>>>>> > >>>>>> _______________________________________________ > >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>>> Amf...@li... > >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>> Amf...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>> > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>> Amf...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> Amforth-devel mailing list for http://amforth.sf.net/ > >>> Amf...@li... > >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >> > >> > >> _______________________________________________ > >> Amforth-devel mailing list for http://amforth.sf.net/ > >> Amf...@li... > >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > > _______________________________________________ > > Amforth-devel mailing list for http://amforth.sf.net/ > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Michael P. <mp...@pl...> - 2021-05-23 04:42:20
|
Hello! I seem to have stumbled across an issue. First code I wrote was to blink the LED onboard. This worked just fine. Then I went to add 'marker'. Entered it line-by-line ... got the 'Ok' after each line. After adding the last line (semicolon), the board froze up. Did a warm boot and then executed 'words' to see what was there. It came back with ?? -13 5. What came to mind is perhaps not enough memory is allocated prior to flashing and I'm overwriting something I shouldn't. Any ideas? Kind regards, Michael On 5/21/2021 1:28 AM, tristan wrote: > Hi Michael, > > Apologies. My memory is failing me. > > The LED is on D13 for both UNO and MEGA, but D13 is mapped to PB5 > (PORTB bit 5) on the UNO and PB7 (PORTB bit 7) on the MEGA. > > Best wishes, > Tristan > > > On 2021-05-21 08:54, tristan wrote: >> Hi Michael, >> >>> I do not see the word 'marker' defined. Should it have been part of >>> the basic system, or do I need to pull it from somewhere? >> >> It is not part of the basic system, it is defined in this file. >> >> avr8/lib/forth2012/core-ext/marker.frt >> >> Using marker is efficient/good practice/etc. but it is not a necessary >> requirement to do below. >> >>> Then I'd like to see about doing something real simple, like turning >>> an LED on/off. It's sort of a hardware person's approach to 'Hello >>> World!' :) >> >> http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html >> >> IIRC the MEGA and UNO have the built-in led on the same pin (port bit). >> >> The definitions for the chip can be found in this file >> >> avr8/devices/atmega2560/atmega2560.frt >> >> These, or extracts from, will need to be loaded into the basic system. >> So longer term, being able to load forth definition non-interactively >> from a file is very useful. There are programs in the tools directory >> - amforth-shell.py being the one I use. >> >> >> Best wishes, >> Tristan >> >> >> >> On 2021-05-21 05:25, Michael Picco wrote: >>> Hello, >>> >>> As mentioned earlier, it's now working. >>> I do not see the word 'marker' defined. Should it have been part of >>> the basic system, or do I need to pull it from somewhere? >>> Then I'd like to see about doing something real simple, like turning >>> an LED on/off. It's sort of a hardware person's approach to 'Hello >>> World!' :) >>> >>> Kind regards, >>> >>> Michael >>> K6MLE >>> >>> >>> On 5/20/2021 12:41 PM, Michael Picco wrote: >>>> I should add the following changes to Craig Lindley's write-up: >>>> >>>> Step 3: >>>> Under Win10, the correct file location for avrasm2.exe will be: >>>> c:\Program >>>> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe >>>> >>>> Also needed in the work directory isatmega256.asm and m2560def.inc >>>> >>>> The image of the directory structure didn't post to the list, so >>>> I'm showing it below (my work directory is called >>>> "amforth-ATmega2560-6.9": >>>> >>>> -- appl >>>> -- arm >>>> -- avr8 >>>> -- common >>>> -- doc >>>> -- examples >>>> -- msp430 >>>> -- risc-v >>>> -- shared >>>> -- tests >>>> -- tools >>>> -- words >>>> atmega256.asm >>>> avrasm2.exe >>>> device.asm (for the 2560) >>>> device.inc (for the 2560) >>>> dict_appl.inc >>>> dict_appl_core.inc >>>> LICENSE.txt >>>> m2560def.inc >>>> make.bat >>>> readme.txt >>>> uno.asm >>>> >>>> Hope this helps! >>>> >>>> Kind regards, >>>> >>>> Michael >>>> K6MLE >>>> >>>> >>>> On 5/20/2021 11:56 AM, Michael Picco wrote: >>>>> Hello All! >>>>> >>>>> I have finally had success! >>>>> It turns out that the .eep and .hex files I was flashing into the >>>>> 2560 were corrupted! >>>>> I followed Craig Lindley's write-up with modifications for the 2560. >>>>> Changed the make.bat file to read: avrasm2.exe -fI -o >>>>> atmega2560.hex -e atmega2560.eep -l atmega2560.lst -I >>>>> g:\amforth-atmega2560\common -I g:\amforth-atmega2560\avr8 -I >>>>> g:\amforth-atmega2560\avr8\drivers -I include -v0 atmega256.asm >>>>> >>>>> This is the resulting file structure prior to executing make.bat: >>>>> >>>>> The fuse setting in Studio 7 were set as follows: >>>>> E: 0xFF, H: 0xDC, L:0xFF >>>>> >>>>> Programmed the fuses; set the new files up in Studio 7 for flash >>>>> and EEPROM; programmed the .hex and .eep files. >>>>> >>>>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! >>>>> >>>>> I'm hoping this exercise might help others. >>>>> >>>>> Kind regards, >>>>> >>>>> Michael >>>>> K6MLE >>>>> >>>>> On 5/18/2021 8:51 AM, tristan wrote: >>>>>> Hello Michael, >>>>>> >>>>>> Getting AmForth up and running from archive hex files on a >>>>>> mega2560 is reasonably straightforward, however, I don't use >>>>>> Microchip Studio version 7 or win10 so I can't help with this >>>>>> tool set. I hope you able to translate the macos/linux to your >>>>>> tools - and if so a write-up would be very welcome! >>>>>> >>>>>> As pointed out you need a programmer (such as usbtiny, usbasp, >>>>>> avrisp2 etc.) and a program to talk to the programmer (such as >>>>>> avrdude). >>>>>> >>>>>> Both atmega2560.hex and atmega2560.eep.hex need to be written to >>>>>> the mega2560's flash/eeprom. Below are the command lines I use >>>>>> with avrdude >>>>>> >>>>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >>>>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >>>>>> >>>>>> Flashing these file will overwrite any existing bootloader. It is >>>>>> worth considering whether you are able to reverse this should you >>>>>> wish to, before flashing the above files. >>>>>> >>>>>> If your mega2560 is an Arduino style board, and the default fuses >>>>>> unchanged, then IIRC there is no need to reprogram the fuses. >>>>>> >>>>>> Once the files have been flashed, you should be able to connect >>>>>> to the mega2560 over serial using 38400 8N1. I use minicom and >>>>>> amforth-shell.py You will need to identify the name of the serial >>>>>> device created by the USB to SERIAL chip on your board/setup to >>>>>> use any serial program. >>>>>> >>>>>> Once connected you have the AmForth interpreter prompt and can >>>>>> interact, compile new words, and generally use the system. >>>>>> However, AmForth is modular and not all functionality is >>>>>> contained in the flashed hex files. For I2C and SPI new words >>>>>> need to be defined. These definitions are already available >>>>>> within the archive, but need to be loaded onto a "new" AmForth >>>>>> system. I find amforth-shell.py very helpful for automating this >>>>>> process. >>>>>> >>>>>> The cookbook is a great place to see examples of how things can >>>>>> be done >>>>>> >>>>>> http://amforth.sourceforge.net/TG/Cookbook.html >>>>>> >>>>>> And for I2C, below is very helpful >>>>>> >>>>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >>>>>> >>>>>> Let us know how you get on. >>>>>> >>>>>> >>>>>> Best wishes, >>>>>> Tristan >>>>>> >>>>>> >>>>>> >>>>>> On 2021-05-18 14:31, BK Navarette wrote: >>>>>>> Be careful, the fuse settings particularly the boot size is >>>>>>> different >>>>>>> for flash forth vs amforth. >>>>>>> >>>>>>> Brian >>>>>>> >>>>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>>>>>> Hello, >>>>>>>> I have not used Amforth >>>>>>>> But the installation mechanisms are the same as for FlashForth: >>>>>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>>>>>> once FORTH is installed, you must write the programs in FORTH >>>>>>>> language and >>>>>>>> have them compile by FORTH on the ARDUINO card. >>>>>>>> FORTH is an interpreter and a compiler. We communicate with >>>>>>>> FORTH via >>>>>>>> terminal software: >>>>>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>>>>>> Unless I'm mistaken, you need an MKII programmer, because you >>>>>>>> can only >>>>>>>> inject a .HEX file through this device. This operation >>>>>>>> overwrites the >>>>>>>> original bootloader. >>>>>>>> BR >>>>>>>> >>>>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco >>>>>>>> <mp...@pl...> a écrit : >>>>>>>> >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> I am attempting to use the mega2560 as a nicely featured >>>>>>>>> development >>>>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 >>>>>>>>> box, with >>>>>>>>> Microchip Studio version 7 installed. >>>>>>>>> >>>>>>>>> In the zip file, under appl/atmega2561, I notice >>>>>>>>> atmega256.eep.hex and >>>>>>>>> atmega256.hex. The eep.hex file doesn't seem to get >>>>>>>>> recognized by >>>>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>>>>>> >>>>>>>>> Can I start building the platform by flashing these files into >>>>>>>>> the >>>>>>>>> board? If so, what is the process to add functionality (I2C, >>>>>>>>> SPI, >>>>>>>>> etc.)? As a total newbie! >>>>>>>>> >>>>>>>>> If it's necessary to recompile and create new hex files, the >>>>>>>>> process is >>>>>>>>> unclear. Is it spelled out somewhere such that a beginner can >>>>>>>>> follow >>>>>>>>> some basic steps to make the proper file(s)? >>>>>>>>> >>>>>>>>> It is my understanding that both flash and EEPROM need to be >>>>>>>>> written, >>>>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have >>>>>>>>> these correct? >>>>>>>>> >>>>>>>>> Once I get this figured out, I'd like to submit a write-up for >>>>>>>>> newbies >>>>>>>>> and perhaps draw more users into AmForth. How might I get >>>>>>>>> this posted, >>>>>>>>> when completed? >>>>>>>>> >>>>>>>>> Thank you in advance! >>>>>>>>> >>>>>>>>> Kind regards, >>>>>>>>> >>>>>>>>> Michael >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>>> Amf...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>> Amf...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>> Amf...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>> Amf...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: tristan <ho...@tj...> - 2021-05-21 08:29:15
|
Hi Michael, Apologies. My memory is failing me. The LED is on D13 for both UNO and MEGA, but D13 is mapped to PB5 (PORTB bit 5) on the UNO and PB7 (PORTB bit 7) on the MEGA. Best wishes, Tristan On 2021-05-21 08:54, tristan wrote: > Hi Michael, > >> I do not see the word 'marker' defined. Should it have been part of >> the basic system, or do I need to pull it from somewhere? > > It is not part of the basic system, it is defined in this file. > > avr8/lib/forth2012/core-ext/marker.frt > > Using marker is efficient/good practice/etc. but it is not a necessary > requirement to do below. > >> Then I'd like to see about doing something real simple, like turning >> an LED on/off. It's sort of a hardware person's approach to 'Hello >> World!' :) > > http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html > > IIRC the MEGA and UNO have the built-in led on the same pin (port bit). > > The definitions for the chip can be found in this file > > avr8/devices/atmega2560/atmega2560.frt > > These, or extracts from, will need to be loaded into the basic system. > So longer term, being able to load forth definition non-interactively > from a file is very useful. There are programs in the tools directory > - amforth-shell.py being the one I use. > > > Best wishes, > Tristan > > > > On 2021-05-21 05:25, Michael Picco wrote: >> Hello, >> >> As mentioned earlier, it's now working. >> I do not see the word 'marker' defined. Should it have been part of >> the basic system, or do I need to pull it from somewhere? >> Then I'd like to see about doing something real simple, like turning >> an LED on/off. It's sort of a hardware person's approach to 'Hello >> World!' :) >> >> Kind regards, >> >> Michael >> K6MLE >> >> >> On 5/20/2021 12:41 PM, Michael Picco wrote: >>> I should add the following changes to Craig Lindley's write-up: >>> >>> Step 3: >>> Under Win10, the correct file location for avrasm2.exe will be: >>> c:\Program >>> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe >>> >>> Also needed in the work directory isatmega256.asm and m2560def.inc >>> >>> The image of the directory structure didn't post to the list, so I'm >>> showing it below (my work directory is called >>> "amforth-ATmega2560-6.9": >>> >>> -- appl >>> -- arm >>> -- avr8 >>> -- common >>> -- doc >>> -- examples >>> -- msp430 >>> -- risc-v >>> -- shared >>> -- tests >>> -- tools >>> -- words >>> atmega256.asm >>> avrasm2.exe >>> device.asm (for the 2560) >>> device.inc (for the 2560) >>> dict_appl.inc >>> dict_appl_core.inc >>> LICENSE.txt >>> m2560def.inc >>> make.bat >>> readme.txt >>> uno.asm >>> >>> Hope this helps! >>> >>> Kind regards, >>> >>> Michael >>> K6MLE >>> >>> >>> On 5/20/2021 11:56 AM, Michael Picco wrote: >>>> Hello All! >>>> >>>> I have finally had success! >>>> It turns out that the .eep and .hex files I was flashing into the >>>> 2560 were corrupted! >>>> I followed Craig Lindley's write-up with modifications for the 2560. >>>> Changed the make.bat file to read: avrasm2.exe -fI -o atmega2560.hex >>>> -e atmega2560.eep -l atmega2560.lst -I g:\amforth-atmega2560\common >>>> -I g:\amforth-atmega2560\avr8 -I g:\amforth-atmega2560\avr8\drivers >>>> -I include -v0 atmega256.asm >>>> >>>> This is the resulting file structure prior to executing make.bat: >>>> >>>> The fuse setting in Studio 7 were set as follows: >>>> E: 0xFF, H: 0xDC, L:0xFF >>>> >>>> Programmed the fuses; set the new files up in Studio 7 for flash and >>>> EEPROM; programmed the .hex and .eep files. >>>> >>>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! >>>> >>>> I'm hoping this exercise might help others. >>>> >>>> Kind regards, >>>> >>>> Michael >>>> K6MLE >>>> >>>> On 5/18/2021 8:51 AM, tristan wrote: >>>>> Hello Michael, >>>>> >>>>> Getting AmForth up and running from archive hex files on a mega2560 >>>>> is reasonably straightforward, however, I don't use Microchip >>>>> Studio version 7 or win10 so I can't help with this tool set. I >>>>> hope you able to translate the macos/linux to your tools - and if >>>>> so a write-up would be very welcome! >>>>> >>>>> As pointed out you need a programmer (such as usbtiny, usbasp, >>>>> avrisp2 etc.) and a program to talk to the programmer (such as >>>>> avrdude). >>>>> >>>>> Both atmega2560.hex and atmega2560.eep.hex need to be written to >>>>> the mega2560's flash/eeprom. Below are the command lines I use with >>>>> avrdude >>>>> >>>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >>>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >>>>> >>>>> Flashing these file will overwrite any existing bootloader. It is >>>>> worth considering whether you are able to reverse this should you >>>>> wish to, before flashing the above files. >>>>> >>>>> If your mega2560 is an Arduino style board, and the default fuses >>>>> unchanged, then IIRC there is no need to reprogram the fuses. >>>>> >>>>> Once the files have been flashed, you should be able to connect to >>>>> the mega2560 over serial using 38400 8N1. I use minicom and >>>>> amforth-shell.py You will need to identify the name of the serial >>>>> device created by the USB to SERIAL chip on your board/setup to use >>>>> any serial program. >>>>> >>>>> Once connected you have the AmForth interpreter prompt and can >>>>> interact, compile new words, and generally use the system. However, >>>>> AmForth is modular and not all functionality is contained in the >>>>> flashed hex files. For I2C and SPI new words need to be defined. >>>>> These definitions are already available within the archive, but >>>>> need to be loaded onto a "new" AmForth system. I find >>>>> amforth-shell.py very helpful for automating this process. >>>>> >>>>> The cookbook is a great place to see examples of how things can be >>>>> done >>>>> >>>>> http://amforth.sourceforge.net/TG/Cookbook.html >>>>> >>>>> And for I2C, below is very helpful >>>>> >>>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >>>>> >>>>> Let us know how you get on. >>>>> >>>>> >>>>> Best wishes, >>>>> Tristan >>>>> >>>>> >>>>> >>>>> On 2021-05-18 14:31, BK Navarette wrote: >>>>>> Be careful, the fuse settings particularly the boot size is >>>>>> different >>>>>> for flash forth vs amforth. >>>>>> >>>>>> Brian >>>>>> >>>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>>>>> Hello, >>>>>>> I have not used Amforth >>>>>>> But the installation mechanisms are the same as for FlashForth: >>>>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>>>>> once FORTH is installed, you must write the programs in FORTH >>>>>>> language and >>>>>>> have them compile by FORTH on the ARDUINO card. >>>>>>> FORTH is an interpreter and a compiler. We communicate with FORTH >>>>>>> via >>>>>>> terminal software: >>>>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>>>>> Unless I'm mistaken, you need an MKII programmer, because you can >>>>>>> only >>>>>>> inject a .HEX file through this device. This operation overwrites >>>>>>> the >>>>>>> original bootloader. >>>>>>> BR >>>>>>> >>>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco >>>>>>> <mp...@pl...> a écrit : >>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> I am attempting to use the mega2560 as a nicely featured >>>>>>>> development >>>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 box, >>>>>>>> with >>>>>>>> Microchip Studio version 7 installed. >>>>>>>> >>>>>>>> In the zip file, under appl/atmega2561, I notice >>>>>>>> atmega256.eep.hex and >>>>>>>> atmega256.hex. The eep.hex file doesn't seem to get recognized >>>>>>>> by >>>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>>>>> >>>>>>>> Can I start building the platform by flashing these files into >>>>>>>> the >>>>>>>> board? If so, what is the process to add functionality (I2C, >>>>>>>> SPI, >>>>>>>> etc.)? As a total newbie! >>>>>>>> >>>>>>>> If it's necessary to recompile and create new hex files, the >>>>>>>> process is >>>>>>>> unclear. Is it spelled out somewhere such that a beginner can >>>>>>>> follow >>>>>>>> some basic steps to make the proper file(s)? >>>>>>>> >>>>>>>> It is my understanding that both flash and EEPROM need to be >>>>>>>> written, >>>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have >>>>>>>> these correct? >>>>>>>> >>>>>>>> Once I get this figured out, I'd like to submit a write-up for >>>>>>>> newbies >>>>>>>> and perhaps draw more users into AmForth. How might I get this >>>>>>>> posted, >>>>>>>> when completed? >>>>>>>> >>>>>>>> Thank you in advance! >>>>>>>> >>>>>>>> Kind regards, >>>>>>>> >>>>>>>> Michael >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>>> Amf...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>> Amf...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>> Amf...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>> >>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>>> >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: tristan <ho...@tj...> - 2021-05-21 07:54:50
|
Hi Michael, > I do not see the word 'marker' defined. Should it have been part of > the basic system, or do I need to pull it from somewhere? It is not part of the basic system, it is defined in this file. avr8/lib/forth2012/core-ext/marker.frt Using marker is efficient/good practice/etc. but it is not a necessary requirement to do below. > Then I'd like to see about doing something real simple, like turning > an LED on/off. It's sort of a hardware person's approach to 'Hello > World!' :) http://amforth.sourceforge.net/TG/recipes/Arduino-HelloWorld.html IIRC the MEGA and UNO have the built-in led on the same pin (port bit). The definitions for the chip can be found in this file avr8/devices/atmega2560/atmega2560.frt These, or extracts from, will need to be loaded into the basic system. So longer term, being able to load forth definition non-interactively from a file is very useful. There are programs in the tools directory - amforth-shell.py being the one I use. Best wishes, Tristan On 2021-05-21 05:25, Michael Picco wrote: > Hello, > > As mentioned earlier, it's now working. > I do not see the word 'marker' defined. Should it have been part of > the basic system, or do I need to pull it from somewhere? > Then I'd like to see about doing something real simple, like turning > an LED on/off. It's sort of a hardware person's approach to 'Hello > World!' :) > > Kind regards, > > Michael > K6MLE > > > On 5/20/2021 12:41 PM, Michael Picco wrote: >> I should add the following changes to Craig Lindley's write-up: >> >> Step 3: >> Under Win10, the correct file location for avrasm2.exe will be: >> c:\Program >> Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe >> >> Also needed in the work directory isatmega256.asm and m2560def.inc >> >> The image of the directory structure didn't post to the list, so I'm >> showing it below (my work directory is called >> "amforth-ATmega2560-6.9": >> >> -- appl >> -- arm >> -- avr8 >> -- common >> -- doc >> -- examples >> -- msp430 >> -- risc-v >> -- shared >> -- tests >> -- tools >> -- words >> atmega256.asm >> avrasm2.exe >> device.asm (for the 2560) >> device.inc (for the 2560) >> dict_appl.inc >> dict_appl_core.inc >> LICENSE.txt >> m2560def.inc >> make.bat >> readme.txt >> uno.asm >> >> Hope this helps! >> >> Kind regards, >> >> Michael >> K6MLE >> >> >> On 5/20/2021 11:56 AM, Michael Picco wrote: >>> Hello All! >>> >>> I have finally had success! >>> It turns out that the .eep and .hex files I was flashing into the >>> 2560 were corrupted! >>> I followed Craig Lindley's write-up with modifications for the 2560. >>> Changed the make.bat file to read: avrasm2.exe -fI -o atmega2560.hex >>> -e atmega2560.eep -l atmega2560.lst -I g:\amforth-atmega2560\common >>> -I g:\amforth-atmega2560\avr8 -I g:\amforth-atmega2560\avr8\drivers >>> -I include -v0 atmega256.asm >>> >>> This is the resulting file structure prior to executing make.bat: >>> >>> The fuse setting in Studio 7 were set as follows: >>> E: 0xFF, H: 0xDC, L:0xFF >>> >>> Programmed the fuses; set the new files up in Studio 7 for flash and >>> EEPROM; programmed the .hex and .eep files. >>> >>> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! >>> >>> I'm hoping this exercise might help others. >>> >>> Kind regards, >>> >>> Michael >>> K6MLE >>> >>> On 5/18/2021 8:51 AM, tristan wrote: >>>> Hello Michael, >>>> >>>> Getting AmForth up and running from archive hex files on a mega2560 >>>> is reasonably straightforward, however, I don't use Microchip Studio >>>> version 7 or win10 so I can't help with this tool set. I hope you >>>> able to translate the macos/linux to your tools - and if so a >>>> write-up would be very welcome! >>>> >>>> As pointed out you need a programmer (such as usbtiny, usbasp, >>>> avrisp2 etc.) and a program to talk to the programmer (such as >>>> avrdude). >>>> >>>> Both atmega2560.hex and atmega2560.eep.hex need to be written to the >>>> mega2560's flash/eeprom. Below are the command lines I use with >>>> avrdude >>>> >>>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >>>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >>>> >>>> Flashing these file will overwrite any existing bootloader. It is >>>> worth considering whether you are able to reverse this should you >>>> wish to, before flashing the above files. >>>> >>>> If your mega2560 is an Arduino style board, and the default fuses >>>> unchanged, then IIRC there is no need to reprogram the fuses. >>>> >>>> Once the files have been flashed, you should be able to connect to >>>> the mega2560 over serial using 38400 8N1. I use minicom and >>>> amforth-shell.py You will need to identify the name of the serial >>>> device created by the USB to SERIAL chip on your board/setup to use >>>> any serial program. >>>> >>>> Once connected you have the AmForth interpreter prompt and can >>>> interact, compile new words, and generally use the system. However, >>>> AmForth is modular and not all functionality is contained in the >>>> flashed hex files. For I2C and SPI new words need to be defined. >>>> These definitions are already available within the archive, but need >>>> to be loaded onto a "new" AmForth system. I find amforth-shell.py >>>> very helpful for automating this process. >>>> >>>> The cookbook is a great place to see examples of how things can be >>>> done >>>> >>>> http://amforth.sourceforge.net/TG/Cookbook.html >>>> >>>> And for I2C, below is very helpful >>>> >>>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >>>> >>>> Let us know how you get on. >>>> >>>> >>>> Best wishes, >>>> Tristan >>>> >>>> >>>> >>>> On 2021-05-18 14:31, BK Navarette wrote: >>>>> Be careful, the fuse settings particularly the boot size is >>>>> different >>>>> for flash forth vs amforth. >>>>> >>>>> Brian >>>>> >>>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>>>> Hello, >>>>>> I have not used Amforth >>>>>> But the installation mechanisms are the same as for FlashForth: >>>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>>>> once FORTH is installed, you must write the programs in FORTH >>>>>> language and >>>>>> have them compile by FORTH on the ARDUINO card. >>>>>> FORTH is an interpreter and a compiler. We communicate with FORTH >>>>>> via >>>>>> terminal software: >>>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>>>> Unless I'm mistaken, you need an MKII programmer, because you can >>>>>> only >>>>>> inject a .HEX file through this device. This operation overwrites >>>>>> the >>>>>> original bootloader. >>>>>> BR >>>>>> >>>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> >>>>>> a écrit : >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I am attempting to use the mega2560 as a nicely featured >>>>>>> development >>>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 box, >>>>>>> with >>>>>>> Microchip Studio version 7 installed. >>>>>>> >>>>>>> In the zip file, under appl/atmega2561, I notice >>>>>>> atmega256.eep.hex and >>>>>>> atmega256.hex. The eep.hex file doesn't seem to get recognized >>>>>>> by >>>>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>>>> >>>>>>> Can I start building the platform by flashing these files into >>>>>>> the >>>>>>> board? If so, what is the process to add functionality (I2C, >>>>>>> SPI, >>>>>>> etc.)? As a total newbie! >>>>>>> >>>>>>> If it's necessary to recompile and create new hex files, the >>>>>>> process is >>>>>>> unclear. Is it spelled out somewhere such that a beginner can >>>>>>> follow >>>>>>> some basic steps to make the proper file(s)? >>>>>>> >>>>>>> It is my understanding that both flash and EEPROM need to be >>>>>>> written, >>>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these >>>>>>> correct? >>>>>>> >>>>>>> Once I get this figured out, I'd like to submit a write-up for >>>>>>> newbies >>>>>>> and perhaps draw more users into AmForth. How might I get this >>>>>>> posted, >>>>>>> when completed? >>>>>>> >>>>>>> Thank you in advance! >>>>>>> >>>>>>> Kind regards, >>>>>>> >>>>>>> Michael >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>>> Amf...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>>> >>>>>> _______________________________________________ >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>> Amf...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>> >>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: George H. <jac...@gm...> - 2021-05-21 04:26:45
|
Thanks, knowing what it takes for a successful installation is a valuable contribution to AmForth users. The ATmega2560 is very appealing as the added i/o ports make it much more versatile than the ATmega328p. On Fri, May 21, 2021 at 3:42 AM Michael Picco <mp...@pl...> wrote: > I should add the following changes to Craig Lindley's write-up: > > Step 3: > Under Win10, the correct file location for avrasm2.exe will be: > c:\Program > Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe > > Also needed in the work directory isatmega256.asm and m2560def.inc > > The image of the directory structure didn't post to the list, so I'm > showing it below (my work directory is called "amforth-ATmega2560-6.9": > > -- appl > -- arm > -- avr8 > -- common > -- doc > -- examples > -- msp430 > -- risc-v > -- shared > -- tests > -- tools > -- words > atmega256.asm > avrasm2.exe > device.asm (for the 2560) > device.inc (for the 2560) > dict_appl.inc > dict_appl_core.inc > LICENSE.txt > m2560def.inc > make.bat > readme.txt > uno.asm > > Hope this helps! > > Kind regards, > > Michael > K6MLE > > > On 5/20/2021 11:56 AM, Michael Picco wrote: > > Hello All! > > > > I have finally had success! > > It turns out that the .eep and .hex files I was flashing into the 2560 > > were corrupted! > > I followed Craig Lindley's write-up with modifications for the 2560. > > Changed the make.bat file to read: avrasm2.exe -fI -o atmega2560.hex > > -e atmega2560.eep -l atmega2560.lst -I g:\amforth-atmega2560\common -I > > g:\amforth-atmega2560\avr8 -I g:\amforth-atmega2560\avr8\drivers -I > > include -v0 atmega256.asm > > > > This is the resulting file structure prior to executing make.bat: > > > > The fuse setting in Studio 7 were set as follows: > > E: 0xFF, H: 0xDC, L:0xFF > > > > Programmed the fuses; set the new files up in Studio 7 for flash and > > EEPROM; programmed the .hex and .eep files. > > > > Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! > > > > I'm hoping this exercise might help others. > > > > Kind regards, > > > > Michael > > K6MLE > > > > On 5/18/2021 8:51 AM, tristan wrote: > >> Hello Michael, > >> > >> Getting AmForth up and running from archive hex files on a mega2560 > >> is reasonably straightforward, however, I don't use Microchip Studio > >> version 7 or win10 so I can't help with this tool set. I hope you > >> able to translate the macos/linux to your tools - and if so a > >> write-up would be very welcome! > >> > >> As pointed out you need a programmer (such as usbtiny, usbasp, > >> avrisp2 etc.) and a program to talk to the programmer (such as avrdude). > >> > >> Both atmega2560.hex and atmega2560.eep.hex need to be written to the > >> mega2560's flash/eeprom. Below are the command lines I use with avrdude > >> > >> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i > >> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i > >> > >> Flashing these file will overwrite any existing bootloader. It is > >> worth considering whether you are able to reverse this should you > >> wish to, before flashing the above files. > >> > >> If your mega2560 is an Arduino style board, and the default fuses > >> unchanged, then IIRC there is no need to reprogram the fuses. > >> > >> Once the files have been flashed, you should be able to connect to > >> the mega2560 over serial using 38400 8N1. I use minicom and > >> amforth-shell.py You will need to identify the name of the serial > >> device created by the USB to SERIAL chip on your board/setup to use > >> any serial program. > >> > >> Once connected you have the AmForth interpreter prompt and can > >> interact, compile new words, and generally use the system. However, > >> AmForth is modular and not all functionality is contained in the > >> flashed hex files. For I2C and SPI new words need to be defined. > >> These definitions are already available within the archive, but need > >> to be loaded onto a "new" AmForth system. I find amforth-shell.py > >> very helpful for automating this process. > >> > >> The cookbook is a great place to see examples of how things can be done > >> > >> http://amforth.sourceforge.net/TG/Cookbook.html > >> > >> And for I2C, below is very helpful > >> > >> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html > >> > >> Let us know how you get on. > >> > >> > >> Best wishes, > >> Tristan > >> > >> > >> > >> On 2021-05-18 14:31, BK Navarette wrote: > >>> Be careful, the fuse settings particularly the boot size is different > >>> for flash forth vs amforth. > >>> > >>> Brian > >>> > >>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: > >>>> Hello, > >>>> I have not used Amforth > >>>> But the installation mechanisms are the same as for FlashForth: > >>>> > https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth > >>>> > >>>> once FORTH is installed, you must write the programs in FORTH > >>>> language and > >>>> have them compile by FORTH on the ARDUINO card. > >>>> FORTH is an interpreter and a compiler. We communicate with FORTH via > >>>> terminal software: > >>>> > https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm > >>>> > >>>> Unless I'm mistaken, you need an MKII programmer, because you can only > >>>> inject a .HEX file through this device. This operation overwrites the > >>>> original bootloader. > >>>> BR > >>>> > >>>> Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> > >>>> a écrit : > >>>> > >>>>> Hello, > >>>>> > >>>>> I am attempting to use the mega2560 as a nicely featured development > >>>>> platform for AmForth-6.9. The machine I'm using is a Win10 box, with > >>>>> Microchip Studio version 7 installed. > >>>>> > >>>>> In the zip file, under appl/atmega2561, I notice atmega256.eep.hex > >>>>> and > >>>>> atmega256.hex. The eep.hex file doesn't seem to get recognized by > >>>>> Studio 7. Do I need to rename it to just a ".eep" file? > >>>>> > >>>>> Can I start building the platform by flashing these files into the > >>>>> board? If so, what is the process to add functionality (I2C, SPI, > >>>>> etc.)? As a total newbie! > >>>>> > >>>>> If it's necessary to recompile and create new hex files, the > >>>>> process is > >>>>> unclear. Is it spelled out somewhere such that a beginner can follow > >>>>> some basic steps to make the proper file(s)? > >>>>> > >>>>> It is my understanding that both flash and EEPROM need to be written, > >>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these > >>>>> correct? > >>>>> > >>>>> Once I get this figured out, I'd like to submit a write-up for > >>>>> newbies > >>>>> and perhaps draw more users into AmForth. How might I get this > >>>>> posted, > >>>>> when completed? > >>>>> > >>>>> Thank you in advance! > >>>>> > >>>>> Kind regards, > >>>>> > >>>>> Michael > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>>> Amf...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>>>> > >>>> _______________________________________________ > >>>> Amforth-devel mailing list for http://amforth.sf.net/ > >>>> Amf...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >>> > >>> > >>> _______________________________________________ > >>> Amforth-devel mailing list for http://amforth.sf.net/ > >>> Amf...@li... > >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel > >> > >> > >> _______________________________________________ > >> Amforth-devel mailing list for http://amforth.sf.net/ > >> Amf...@li... > >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > > > > _______________________________________________ > > Amforth-devel mailing list for http://amforth.sf.net/ > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Michael P. <mp...@pl...> - 2021-05-21 04:26:00
|
Hello, As mentioned earlier, it's now working. I do not see the word 'marker' defined. Should it have been part of the basic system, or do I need to pull it from somewhere? Then I'd like to see about doing something real simple, like turning an LED on/off. It's sort of a hardware person's approach to 'Hello World!' :) Kind regards, Michael K6MLE On 5/20/2021 12:41 PM, Michael Picco wrote: > I should add the following changes to Craig Lindley's write-up: > > Step 3: > Under Win10, the correct file location for avrasm2.exe will be: > c:\Program > Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe > > Also needed in the work directory isatmega256.asm and m2560def.inc > > The image of the directory structure didn't post to the list, so I'm > showing it below (my work directory is called "amforth-ATmega2560-6.9": > > -- appl > -- arm > -- avr8 > -- common > -- doc > -- examples > -- msp430 > -- risc-v > -- shared > -- tests > -- tools > -- words > atmega256.asm > avrasm2.exe > device.asm (for the 2560) > device.inc (for the 2560) > dict_appl.inc > dict_appl_core.inc > LICENSE.txt > m2560def.inc > make.bat > readme.txt > uno.asm > > Hope this helps! > > Kind regards, > > Michael > K6MLE > > > On 5/20/2021 11:56 AM, Michael Picco wrote: >> Hello All! >> >> I have finally had success! >> It turns out that the .eep and .hex files I was flashing into the >> 2560 were corrupted! >> I followed Craig Lindley's write-up with modifications for the 2560. >> Changed the make.bat file to read: avrasm2.exe -fI -o atmega2560.hex >> -e atmega2560.eep -l atmega2560.lst -I g:\amforth-atmega2560\common >> -I g:\amforth-atmega2560\avr8 -I g:\amforth-atmega2560\avr8\drivers >> -I include -v0 atmega256.asm >> >> This is the resulting file structure prior to executing make.bat: >> >> The fuse setting in Studio 7 were set as follows: >> E: 0xFF, H: 0xDC, L:0xFF >> >> Programmed the fuses; set the new files up in Studio 7 for flash and >> EEPROM; programmed the .hex and .eep files. >> >> Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! >> >> I'm hoping this exercise might help others. >> >> Kind regards, >> >> Michael >> K6MLE >> >> On 5/18/2021 8:51 AM, tristan wrote: >>> Hello Michael, >>> >>> Getting AmForth up and running from archive hex files on a mega2560 >>> is reasonably straightforward, however, I don't use Microchip Studio >>> version 7 or win10 so I can't help with this tool set. I hope you >>> able to translate the macos/linux to your tools - and if so a >>> write-up would be very welcome! >>> >>> As pointed out you need a programmer (such as usbtiny, usbasp, >>> avrisp2 etc.) and a program to talk to the programmer (such as >>> avrdude). >>> >>> Both atmega2560.hex and atmega2560.eep.hex need to be written to the >>> mega2560's flash/eeprom. Below are the command lines I use with avrdude >>> >>> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >>> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >>> >>> Flashing these file will overwrite any existing bootloader. It is >>> worth considering whether you are able to reverse this should you >>> wish to, before flashing the above files. >>> >>> If your mega2560 is an Arduino style board, and the default fuses >>> unchanged, then IIRC there is no need to reprogram the fuses. >>> >>> Once the files have been flashed, you should be able to connect to >>> the mega2560 over serial using 38400 8N1. I use minicom and >>> amforth-shell.py You will need to identify the name of the serial >>> device created by the USB to SERIAL chip on your board/setup to use >>> any serial program. >>> >>> Once connected you have the AmForth interpreter prompt and can >>> interact, compile new words, and generally use the system. However, >>> AmForth is modular and not all functionality is contained in the >>> flashed hex files. For I2C and SPI new words need to be defined. >>> These definitions are already available within the archive, but need >>> to be loaded onto a "new" AmForth system. I find amforth-shell.py >>> very helpful for automating this process. >>> >>> The cookbook is a great place to see examples of how things can be done >>> >>> http://amforth.sourceforge.net/TG/Cookbook.html >>> >>> And for I2C, below is very helpful >>> >>> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >>> >>> Let us know how you get on. >>> >>> >>> Best wishes, >>> Tristan >>> >>> >>> >>> On 2021-05-18 14:31, BK Navarette wrote: >>>> Be careful, the fuse settings particularly the boot size is different >>>> for flash forth vs amforth. >>>> >>>> Brian >>>> >>>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>>> Hello, >>>>> I have not used Amforth >>>>> But the installation mechanisms are the same as for FlashForth: >>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>>> >>>>> once FORTH is installed, you must write the programs in FORTH >>>>> language and >>>>> have them compile by FORTH on the ARDUINO card. >>>>> FORTH is an interpreter and a compiler. We communicate with FORTH via >>>>> terminal software: >>>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>>> >>>>> Unless I'm mistaken, you need an MKII programmer, because you can >>>>> only >>>>> inject a .HEX file through this device. This operation overwrites the >>>>> original bootloader. >>>>> BR >>>>> >>>>> Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> >>>>> a écrit : >>>>> >>>>>> Hello, >>>>>> >>>>>> I am attempting to use the mega2560 as a nicely featured development >>>>>> platform for AmForth-6.9. The machine I'm using is a Win10 box, >>>>>> with >>>>>> Microchip Studio version 7 installed. >>>>>> >>>>>> In the zip file, under appl/atmega2561, I notice >>>>>> atmega256.eep.hex and >>>>>> atmega256.hex. The eep.hex file doesn't seem to get recognized by >>>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>>> >>>>>> Can I start building the platform by flashing these files into the >>>>>> board? If so, what is the process to add functionality (I2C, SPI, >>>>>> etc.)? As a total newbie! >>>>>> >>>>>> If it's necessary to recompile and create new hex files, the >>>>>> process is >>>>>> unclear. Is it spelled out somewhere such that a beginner can >>>>>> follow >>>>>> some basic steps to make the proper file(s)? >>>>>> >>>>>> It is my understanding that both flash and EEPROM need to be >>>>>> written, >>>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these >>>>>> correct? >>>>>> >>>>>> Once I get this figured out, I'd like to submit a write-up for >>>>>> newbies >>>>>> and perhaps draw more users into AmForth. How might I get this >>>>>> posted, >>>>>> when completed? >>>>>> >>>>>> Thank you in advance! >>>>>> >>>>>> Kind regards, >>>>>> >>>>>> Michael >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>>> Amf...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Michael P. <mp...@pl...> - 2021-05-20 19:41:45
|
I should add the following changes to Craig Lindley's write-up: Step 3: Under Win10, the correct file location for avrasm2.exe will be: c:\Program Files(86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe Also needed in the work directory isatmega256.asm and m2560def.inc The image of the directory structure didn't post to the list, so I'm showing it below (my work directory is called "amforth-ATmega2560-6.9": -- appl -- arm -- avr8 -- common -- doc -- examples -- msp430 -- risc-v -- shared -- tests -- tools -- words atmega256.asm avrasm2.exe device.asm (for the 2560) device.inc (for the 2560) dict_appl.inc dict_appl_core.inc LICENSE.txt m2560def.inc make.bat readme.txt uno.asm Hope this helps! Kind regards, Michael K6MLE On 5/20/2021 11:56 AM, Michael Picco wrote: > Hello All! > > I have finally had success! > It turns out that the .eep and .hex files I was flashing into the 2560 > were corrupted! > I followed Craig Lindley's write-up with modifications for the 2560. > Changed the make.bat file to read: avrasm2.exe -fI -o atmega2560.hex > -e atmega2560.eep -l atmega2560.lst -I g:\amforth-atmega2560\common -I > g:\amforth-atmega2560\avr8 -I g:\amforth-atmega2560\avr8\drivers -I > include -v0 atmega256.asm > > This is the resulting file structure prior to executing make.bat: > > The fuse setting in Studio 7 were set as follows: > E: 0xFF, H: 0xDC, L:0xFF > > Programmed the fuses; set the new files up in Studio 7 for flash and > EEPROM; programmed the .hex and .eep files. > > Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! > > I'm hoping this exercise might help others. > > Kind regards, > > Michael > K6MLE > > On 5/18/2021 8:51 AM, tristan wrote: >> Hello Michael, >> >> Getting AmForth up and running from archive hex files on a mega2560 >> is reasonably straightforward, however, I don't use Microchip Studio >> version 7 or win10 so I can't help with this tool set. I hope you >> able to translate the macos/linux to your tools - and if so a >> write-up would be very welcome! >> >> As pointed out you need a programmer (such as usbtiny, usbasp, >> avrisp2 etc.) and a program to talk to the programmer (such as avrdude). >> >> Both atmega2560.hex and atmega2560.eep.hex need to be written to the >> mega2560's flash/eeprom. Below are the command lines I use with avrdude >> >> avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i >> avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i >> >> Flashing these file will overwrite any existing bootloader. It is >> worth considering whether you are able to reverse this should you >> wish to, before flashing the above files. >> >> If your mega2560 is an Arduino style board, and the default fuses >> unchanged, then IIRC there is no need to reprogram the fuses. >> >> Once the files have been flashed, you should be able to connect to >> the mega2560 over serial using 38400 8N1. I use minicom and >> amforth-shell.py You will need to identify the name of the serial >> device created by the USB to SERIAL chip on your board/setup to use >> any serial program. >> >> Once connected you have the AmForth interpreter prompt and can >> interact, compile new words, and generally use the system. However, >> AmForth is modular and not all functionality is contained in the >> flashed hex files. For I2C and SPI new words need to be defined. >> These definitions are already available within the archive, but need >> to be loaded onto a "new" AmForth system. I find amforth-shell.py >> very helpful for automating this process. >> >> The cookbook is a great place to see examples of how things can be done >> >> http://amforth.sourceforge.net/TG/Cookbook.html >> >> And for I2C, below is very helpful >> >> http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html >> >> Let us know how you get on. >> >> >> Best wishes, >> Tristan >> >> >> >> On 2021-05-18 14:31, BK Navarette wrote: >>> Be careful, the fuse settings particularly the boot size is different >>> for flash forth vs amforth. >>> >>> Brian >>> >>> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>>> Hello, >>>> I have not used Amforth >>>> But the installation mechanisms are the same as for FlashForth: >>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>>> >>>> once FORTH is installed, you must write the programs in FORTH >>>> language and >>>> have them compile by FORTH on the ARDUINO card. >>>> FORTH is an interpreter and a compiler. We communicate with FORTH via >>>> terminal software: >>>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>>> >>>> Unless I'm mistaken, you need an MKII programmer, because you can only >>>> inject a .HEX file through this device. This operation overwrites the >>>> original bootloader. >>>> BR >>>> >>>> Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> >>>> a écrit : >>>> >>>>> Hello, >>>>> >>>>> I am attempting to use the mega2560 as a nicely featured development >>>>> platform for AmForth-6.9. The machine I'm using is a Win10 box, with >>>>> Microchip Studio version 7 installed. >>>>> >>>>> In the zip file, under appl/atmega2561, I notice atmega256.eep.hex >>>>> and >>>>> atmega256.hex. The eep.hex file doesn't seem to get recognized by >>>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>>> >>>>> Can I start building the platform by flashing these files into the >>>>> board? If so, what is the process to add functionality (I2C, SPI, >>>>> etc.)? As a total newbie! >>>>> >>>>> If it's necessary to recompile and create new hex files, the >>>>> process is >>>>> unclear. Is it spelled out somewhere such that a beginner can follow >>>>> some basic steps to make the proper file(s)? >>>>> >>>>> It is my understanding that both flash and EEPROM need to be written, >>>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these >>>>> correct? >>>>> >>>>> Once I get this figured out, I'd like to submit a write-up for >>>>> newbies >>>>> and perhaps draw more users into AmForth. How might I get this >>>>> posted, >>>>> when completed? >>>>> >>>>> Thank you in advance! >>>>> >>>>> Kind regards, >>>>> >>>>> Michael >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>>> Amf...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Michael P. <mp...@pl...> - 2021-05-20 18:56:32
|
Hello All! I have finally had success! It turns out that the .eep and .hex files I was flashing into the 2560 were corrupted! I followed Craig Lindley's write-up with modifications for the 2560. Changed the make.bat file to read: avrasm2.exe -fI -o atmega2560.hex -e atmega2560.eep -l atmega2560.lst -I g:\amforth-atmega2560\common -I g:\amforth-atmega2560\avr8 -I g:\amforth-atmega2560\avr8\drivers -I include -v0 atmega256.asm This is the resulting file structure prior to executing make.bat: The fuse setting in Studio 7 were set as follows: E: 0xFF, H: 0xDC, L:0xFF Programmed the fuses; set the new files up in Studio 7 for flash and EEPROM; programmed the .hex and .eep files. Have a nice prompt for "amforth 6.9 ATmega2560 Forthduino" !!! I'm hoping this exercise might help others. Kind regards, Michael K6MLE On 5/18/2021 8:51 AM, tristan wrote: > Hello Michael, > > Getting AmForth up and running from archive hex files on a mega2560 is > reasonably straightforward, however, I don't use Microchip Studio > version 7 or win10 so I can't help with this tool set. I hope you able > to translate the macos/linux to your tools - and if so a write-up > would be very welcome! > > As pointed out you need a programmer (such as usbtiny, usbasp, avrisp2 > etc.) and a program to talk to the programmer (such as avrdude). > > Both atmega2560.hex and atmega2560.eep.hex need to be written to the > mega2560's flash/eeprom. Below are the command lines I use with avrdude > > avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i > avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i > > Flashing these file will overwrite any existing bootloader. It is > worth considering whether you are able to reverse this should you wish > to, before flashing the above files. > > If your mega2560 is an Arduino style board, and the default fuses > unchanged, then IIRC there is no need to reprogram the fuses. > > Once the files have been flashed, you should be able to connect to the > mega2560 over serial using 38400 8N1. I use minicom and > amforth-shell.py You will need to identify the name of the serial > device created by the USB to SERIAL chip on your board/setup to use > any serial program. > > Once connected you have the AmForth interpreter prompt and can > interact, compile new words, and generally use the system. However, > AmForth is modular and not all functionality is contained in the > flashed hex files. For I2C and SPI new words need to be defined. These > definitions are already available within the archive, but need to be > loaded onto a "new" AmForth system. I find amforth-shell.py very > helpful for automating this process. > > The cookbook is a great place to see examples of how things can be done > > http://amforth.sourceforge.net/TG/Cookbook.html > > And for I2C, below is very helpful > > http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html > > Let us know how you get on. > > > Best wishes, > Tristan > > > > On 2021-05-18 14:31, BK Navarette wrote: >> Be careful, the fuse settings particularly the boot size is different >> for flash forth vs amforth. >> >> Brian >> >> On 5/18/21 5:30 AM, PETREMANN Marc wrote: >>> Hello, >>> I have not used Amforth >>> But the installation mechanisms are the same as for FlashForth: >>> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >>> >>> once FORTH is installed, you must write the programs in FORTH >>> language and >>> have them compile by FORTH on the ARDUINO card. >>> FORTH is an interpreter and a compiler. We communicate with FORTH via >>> terminal software: >>> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >>> >>> Unless I'm mistaken, you need an MKII programmer, because you can only >>> inject a .HEX file through this device. This operation overwrites the >>> original bootloader. >>> BR >>> >>> Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> a >>> écrit : >>> >>>> Hello, >>>> >>>> I am attempting to use the mega2560 as a nicely featured development >>>> platform for AmForth-6.9. The machine I'm using is a Win10 box, with >>>> Microchip Studio version 7 installed. >>>> >>>> In the zip file, under appl/atmega2561, I notice atmega256.eep.hex and >>>> atmega256.hex. The eep.hex file doesn't seem to get recognized by >>>> Studio 7. Do I need to rename it to just a ".eep" file? >>>> >>>> Can I start building the platform by flashing these files into the >>>> board? If so, what is the process to add functionality (I2C, SPI, >>>> etc.)? As a total newbie! >>>> >>>> If it's necessary to recompile and create new hex files, the >>>> process is >>>> unclear. Is it spelled out somewhere such that a beginner can follow >>>> some basic steps to make the proper file(s)? >>>> >>>> It is my understanding that both flash and EEPROM need to be written, >>>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these >>>> correct? >>>> >>>> Once I get this figured out, I'd like to submit a write-up for newbies >>>> and perhaps draw more users into AmForth. How might I get this >>>> posted, >>>> when completed? >>>> >>>> Thank you in advance! >>>> >>>> Kind regards, >>>> >>>> Michael >>>> >>>> >>>> >>>> _______________________________________________ >>>> Amforth-devel mailing list for http://amforth.sf.net/ >>>> Amf...@li... >>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: Erich W. <ew....@na...> - 2021-05-18 18:47:55
|
Hello Michael, welcome to the club! Michael Picco <mp...@pl...> writes: > Hello, > > I am attempting to use the mega2560 as a nicely featured development platform > for AmForth-6.9. The machine I'm using is a Win10 box, with Microchip Studio > version 7 installed. > > In the zip file, under appl/atmega2561, I notice atmega256.eep.hex and > atmega256.hex. The eep.hex file doesn't seem to get recognized by > Studio 7. Do I need to rename it to just a ".eep" file? you write mega25_60_ and refer to mega25_61_ typo? Or are they reasonably the same??? > > Can I start building the platform by flashing these files into the board? If > so, what is the process to add functionality (I2C, SPI, etc.)? As a total > newbie! > > If it's necessary to recompile and create new hex files, the process is > unclear. Is it spelled out somewhere such that a beginner can follow > some basic steps to make the proper file(s)? > > It is my understanding that both flash and EEPROM need to be written, along > with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these > correct? Fuses are a bit tricky. You can sort of brick your device. It will not talk to you any more, and ways out are with varying tricks ... So be careful. I do not have a 2560. If I had to use one, I would hunt down the data sheet and read the section about the fuses. And this is plenty confusing stuff. Try to translate the above settings into words. Bit by bit. There is also a "fuse calculator" somewhere online ... http://eleccelerator.com/fusecalc/ There is even an Android App for this LOL! https://play.google.com/store/apps/details?id=me.chayan.avrfusecalculator&hl=en_US&gl=US Again: Do not brick your only one device! If you can possibly help it :-) I have done this. So you don't have to, right? > Once I get this figured out, I'd like to submit a write-up for newbies and > perhaps draw more users into AmForth. There is some document about your setup ... vom Karl maybe ... http://amforth.sourceforge.net/UG/amforth_user.html http://amforth.sourceforge.net/UG/windows.html I have no idea how useful this is today. But feel free to update this document. > How might I get this posted, when > completed? just send it to this list. I'm working on migrating to git. see https://git.sr.ht/~amforth/ for starters. Cheers, Erich -- May the Forth be with you ... |
From: tristan <ho...@tj...> - 2021-05-18 16:14:02
|
Hello Michael, Getting AmForth up and running from archive hex files on a mega2560 is reasonably straightforward, however, I don't use Microchip Studio version 7 or win10 so I can't help with this tool set. I hope you able to translate the macos/linux to your tools - and if so a write-up would be very welcome! As pointed out you need a programmer (such as usbtiny, usbasp, avrisp2 etc.) and a program to talk to the programmer (such as avrdude). Both atmega2560.hex and atmega2560.eep.hex need to be written to the mega2560's flash/eeprom. Below are the command lines I use with avrdude avrdude -p m2560 -c usbtiny -U flash:w:atmega2560.hex:i avrdude -p m2560 -c usbtiny -U eeprom:w:atmega2560.eep.hex:i Flashing these file will overwrite any existing bootloader. It is worth considering whether you are able to reverse this should you wish to, before flashing the above files. If your mega2560 is an Arduino style board, and the default fuses unchanged, then IIRC there is no need to reprogram the fuses. Once the files have been flashed, you should be able to connect to the mega2560 over serial using 38400 8N1. I use minicom and amforth-shell.py You will need to identify the name of the serial device created by the USB to SERIAL chip on your board/setup to use any serial program. Once connected you have the AmForth interpreter prompt and can interact, compile new words, and generally use the system. However, AmForth is modular and not all functionality is contained in the flashed hex files. For I2C and SPI new words need to be defined. These definitions are already available within the archive, but need to be loaded onto a "new" AmForth system. I find amforth-shell.py very helpful for automating this process. The cookbook is a great place to see examples of how things can be done http://amforth.sourceforge.net/TG/Cookbook.html And for I2C, below is very helpful http://amforth.sourceforge.net/TG/recipes/I2C-Generic.html Let us know how you get on. Best wishes, Tristan On 2021-05-18 14:31, BK Navarette wrote: > Be careful, the fuse settings particularly the boot size is different > for flash forth vs amforth. > > Brian > > On 5/18/21 5:30 AM, PETREMANN Marc wrote: >> Hello, >> I have not used Amforth >> But the installation mechanisms are the same as for FlashForth: >> https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth >> once FORTH is installed, you must write the programs in FORTH language >> and >> have them compile by FORTH on the ARDUINO card. >> FORTH is an interpreter and a compiler. We communicate with FORTH via >> terminal software: >> https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm >> Unless I'm mistaken, you need an MKII programmer, because you can only >> inject a .HEX file through this device. This operation overwrites the >> original bootloader. >> BR >> >> Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> a >> écrit : >> >>> Hello, >>> >>> I am attempting to use the mega2560 as a nicely featured development >>> platform for AmForth-6.9. The machine I'm using is a Win10 box, with >>> Microchip Studio version 7 installed. >>> >>> In the zip file, under appl/atmega2561, I notice atmega256.eep.hex >>> and >>> atmega256.hex. The eep.hex file doesn't seem to get recognized by >>> Studio 7. Do I need to rename it to just a ".eep" file? >>> >>> Can I start building the platform by flashing these files into the >>> board? If so, what is the process to add functionality (I2C, SPI, >>> etc.)? As a total newbie! >>> >>> If it's necessary to recompile and create new hex files, the process >>> is >>> unclear. Is it spelled out somewhere such that a beginner can follow >>> some basic steps to make the proper file(s)? >>> >>> It is my understanding that both flash and EEPROM need to be written, >>> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these >>> correct? >>> >>> Once I get this figured out, I'd like to submit a write-up for >>> newbies >>> and perhaps draw more users into AmForth. How might I get this >>> posted, >>> when completed? >>> >>> Thank you in advance! >>> >>> Kind regards, >>> >>> Michael >>> >>> >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >>> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: BK N. <bkn...@gm...> - 2021-05-18 13:30:28
|
Be careful, the fuse settings particularly the boot size is different for flash forth vs amforth. Brian On 5/18/21 5:30 AM, PETREMANN Marc wrote: > Hello, > I have not used Amforth > But the installation mechanisms are the same as for FlashForth: > https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth > once FORTH is installed, you must write the programs in FORTH language and > have them compile by FORTH on the ARDUINO card. > FORTH is an interpreter and a compiler. We communicate with FORTH via > terminal software: > https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm > Unless I'm mistaken, you need an MKII programmer, because you can only > inject a .HEX file through this device. This operation overwrites the > original bootloader. > BR > > Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> a écrit : > >> Hello, >> >> I am attempting to use the mega2560 as a nicely featured development >> platform for AmForth-6.9. The machine I'm using is a Win10 box, with >> Microchip Studio version 7 installed. >> >> In the zip file, under appl/atmega2561, I notice atmega256.eep.hex and >> atmega256.hex. The eep.hex file doesn't seem to get recognized by >> Studio 7. Do I need to rename it to just a ".eep" file? >> >> Can I start building the platform by flashing these files into the >> board? If so, what is the process to add functionality (I2C, SPI, >> etc.)? As a total newbie! >> >> If it's necessary to recompile and create new hex files, the process is >> unclear. Is it spelled out somewhere such that a beginner can follow >> some basic steps to make the proper file(s)? >> >> It is my understanding that both flash and EEPROM need to be written, >> along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these correct? >> >> Once I get this figured out, I'd like to submit a write-up for newbies >> and perhaps draw more users into AmForth. How might I get this posted, >> when completed? >> >> Thank you in advance! >> >> Kind regards, >> >> Michael >> >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
From: PETREMANN M. <pet...@gm...> - 2021-05-18 09:30:50
|
Hello, I have not used Amforth But the installation mechanisms are the same as for FlashForth: https://arduino-forth.com/article/FORTH_FlashForth_installation_installerFlashForth once FORTH is installed, you must write the programs in FORTH language and have them compile by FORTH on the ARDUINO card. FORTH is an interpreter and a compiler. We communicate with FORTH via terminal software: https://arduino-forth.com/article/FORTH_FlashForth_installation_teraTerm Unless I'm mistaken, you need an MKII programmer, because you can only inject a .HEX file through this device. This operation overwrites the original bootloader. BR Le mar. 18 mai 2021 à 06:08, Michael Picco <mp...@pl...> a écrit : > Hello, > > I am attempting to use the mega2560 as a nicely featured development > platform for AmForth-6.9. The machine I'm using is a Win10 box, with > Microchip Studio version 7 installed. > > In the zip file, under appl/atmega2561, I notice atmega256.eep.hex and > atmega256.hex. The eep.hex file doesn't seem to get recognized by > Studio 7. Do I need to rename it to just a ".eep" file? > > Can I start building the platform by flashing these files into the > board? If so, what is the process to add functionality (I2C, SPI, > etc.)? As a total newbie! > > If it's necessary to recompile and create new hex files, the process is > unclear. Is it spelled out somewhere such that a beginner can follow > some basic steps to make the proper file(s)? > > It is my understanding that both flash and EEPROM need to be written, > along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these correct? > > Once I get this figured out, I'd like to submit a write-up for newbies > and perhaps draw more users into AmForth. How might I get this posted, > when completed? > > Thank you in advance! > > Kind regards, > > Michael > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
From: Michael P. <mp...@pl...> - 2021-05-18 04:07:57
|
Hello, I am attempting to use the mega2560 as a nicely featured development platform for AmForth-6.9. The machine I'm using is a Win10 box, with Microchip Studio version 7 installed. In the zip file, under appl/atmega2561, I notice atmega256.eep.hex and atmega256.hex. The eep.hex file doesn't seem to get recognized by Studio 7. Do I need to rename it to just a ".eep" file? Can I start building the platform by flashing these files into the board? If so, what is the process to add functionality (I2C, SPI, etc.)? As a total newbie! If it's necessary to recompile and create new hex files, the process is unclear. Is it spelled out somewhere such that a beginner can follow some basic steps to make the proper file(s)? It is my understanding that both flash and EEPROM need to be written, along with the fuses, [E:0xFF, H: 0xDC, L:0xFF]. Do I have these correct? Once I get this figured out, I'd like to submit a write-up for newbies and perhaps draw more users into AmForth. How might I get this posted, when completed? Thank you in advance! Kind regards, Michael |
From: Dieter S. <di...@sc...> - 2021-04-25 15:57:03
|
Dear all, first, erich, thank you for your kind remarks on my notes! git is just a tool, and the project/users should dictate its usage. So if you find a way which suits you, then this is the way to do it. On the current setup: If you have all the releases in a file tree, you can use all kinds of (shell) tools to compare/find and do not depend on git. It uses a bit more disk space than branches, but nowadays that should be no big issue. Using git tricks (like I demonstrated) is a bit of a vendor-lock-in. other ideas: * whoever is not interested in the releases could do a "sparse checkout" and only get trunk/. * if there is need for tags, those can be introduced anytime. kind regards, dieter On 25.04.21 12:10, Erich Wälde wrote: > Dear AmForthers, > > > despite Dieters excellent demonstration of how to deal with branches: > >> Dear Erich, >> One of the easiest ways to look for the evolution of a file is >> $ git log --all --graph >> This lists all commits, where was changed, and rather nice ascii-art graphs. >> The --all flag looks into all branches. >> If you want to do more sophisticated actions per file/branch, you will have to use "git plumbing" functions. >> Plumbing functions are for low-level tasks, and are more appropriate for scripts. >> For example: >> file=tools/amforth-upload.py >> for branch in $(git for-each-ref --format='%(refname)' refs/heads); do >> br=$(echo $branch | sed "s/.*///") >> echo $br $(git show $br:$file | md5sum | cut -f1 -d" ") ; done >> done >> produces a list of md5 sums for each branch where file occurs. >> git for-each-ref --format='%(refname)' refs/heads : produces a list of branches >> >> git show : : prints the contents of the file at branch >> The rest of the code is just for nicer outputs. >> There are a multitude of methods to perform a given task in git. >> Sometimes there are just too many flags and commands... >> Kind regards, >> Dieter > > I found another reason to stay with the releases folder as a > folder. > > I do have quite a collection of "projects" using AmForth. Since > they were created at diffent times and for different purposes, > they point to specific releases of AmForth most of the time. > Just a quick look through one of my trees: >> ew@ceres:~/Forth/atmega2 18 > find . -iname makefile -exec grep '^AMFORTH=' {} \; | sort -u >> AMFORTH=~/Forth/amforth/releases/4.0/core >> AMFORTH=~/Forth/amforth/releases/5.0/core >> AMFORTH=~/Forth/amforth/releases/5.5/core >> AMFORTH=~/Forth/amforth/releases/5.5/core >> AMFORTH=~/Forth/amforth/releases/6.3 >> AMFORTH=~/Forth/amforth/releases/6.4 >> AMFORTH=~/Forth/amforth/releases/6.6 >> AMFORTH=~/Forth/amforth/releases/6.8 >> AMFORTH=~/Forth/amforth/releases/6.8 >> AMFORTH=~/Forth/amforth/releases/6.9 >> AMFORTH=~/Forth/amforth/trunk > This option ceases to exist with branches. I am of course not > willing to check out the correct Version, even automatically, in > order to build AmForth just now in just this folder. > > Yes, yes. I know, it is not git'ish. > > > In order to experiment I created another repository at > https://git.sr.ht/~amforth/code-tree > > These commands were used to create it: >> cd path/to/your/favourite/place >> mkdir amforth.git >> cd amforth.git >> svn2git https://svn.code.sf.net/p/amforth/code --rootistrunk >> ls >> # releases/ trunk/ >> du -sm . >> # 569 . >> git remote add origin gi...@gi...:~amforth/code-tree >> git push --set-upstream origin master > sourcehut helpfully points out, that it does not see a License > file :) > > > So we see unfolding that "migrations" are possibly more involved > than anticipated. The true effort involved remains unknown until > you actually made it. > > So, any other ideas? > Move the releases folder into what is now trunk? > Move the external, bit rotting amforth-community repository into > what is now trunk, too? > > > > Cheers, > Erich > > > > |