Hi Mikael,
FlashForth is remarkable! I enjoy how well it works on 8-bit processors such as the ATmega328!
I've used avrasm2 on the command line in the past to recompile FlashForth for the ATmega328p and it appears that this won't work in the new XC8 format.
Hi Lief.
This is one way to do it but it requires that you first make a project in MPLABX.
Add -DOPERATOR_UART = "{OPERATOR_UART}" to the MPLABX project XC8 global options
cd FF.X
make clean all MP_PROCESSOR_OPTION=ATmega328 OPERATOR_UART=0
The hex file can be found at
FF.X/dist/default/production/FF.X.production.hex
Mikael
Last edit: Mikael Nordman 2022-04-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I needed to work on some other things, so I left this for a while. :)
I attempted to do as you advised: 1) I believe the addition to global options is: (added $), correct?
-DOPERATOR_UART="${OPERATOR_UART}"
2) I had quite a few errors (> 200) with the usbcdc-xc8.asm file included:
So I excluded the file as I don't believe it is required for the Uno (328P), correct?
3) With that exclusion, I ended up with the follow error, which I haven't determined how to fix:
Info:Loadingfile:/Applications/microchip/xc8/v2.40/avr/avr/bin/../lib/ldscripts/avr5.xn/Applications/microchip/mplabx/v6.05/packs/Microchip/ATmega_DFP/3.0.158/xc8/avr/lib/avr5/memx-const/crtatmega328.o:../../../../../crt1/gcrt1.S:352:undefinedreferenceto`main'/Applications/microchip/mplabx/v6.05/packs/Microchip/ATmega_DFP/3.0.158/xc8/avr/lib/avr5/memx-const/crtatmega328.o:../../../../../crt1/gcrt1.S:353: undefined reference to `exit'collect2:error:ldreturned1exitstatusmake[3]:***[dist/default/production/FF.X.production.hex]Error1make[2]:***[.build-conf]Error2make[1]:***[.build-impl]Error2make:***[.all-impl]Error2
I attempted many variations inside the configuration file for the Project, to no avail. Could you please provide some guidance?
Thank you,
Lief
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Mikael,
FlashForth is remarkable! I enjoy how well it works on 8-bit processors such as the ATmega328!
I've used avrasm2 on the command line in the past to recompile FlashForth for the ATmega328p and it appears that this won't work in the new XC8 format.
My previous command was:
Is there something similar to this using the XC8 compiler/assembler?
Thanks,
Lief
Hi Lief.
This is one way to do it but it requires that you first make a project in MPLABX.
Add -DOPERATOR_UART = "{OPERATOR_UART}" to the MPLABX project XC8 global options
The hex file can be found at
Mikael
Last edit: Mikael Nordman 2022-04-22
Thank you, Mikael
I will try that.
Hi Mikael,
I needed to work on some other things, so I left this for a while. :)
I attempted to do as you advised:
1) I believe the addition to global options is: (added $), correct?
-DOPERATOR_UART="${OPERATOR_UART}"
2) I had quite a few errors (> 200) with the usbcdc-xc8.asm file included:
So I excluded the file as I don't believe it is required for the Uno (328P), correct?
3) With that exclusion, I ended up with the follow error, which I haven't determined how to fix:
I attempted many variations inside the configuration file for the Project, to no avail.
Could you please provide some guidance?
Thank you,
Lief
You should not add the usbcdc-xc8.asm file to the project. It is automatically included for m32u4.
You need to add "-nostartfiles" to the XC8 linker options.
https://flashforth.com/atmega.html
BR Mikael
Thanks! It works pefectly!!