Thread: [Flashforth-devel] arduino
Brought to you by:
oh2aun
From: hc <ml...@i2...> - 2018-07-25 22:03:48
|
I think it would be beneficial for FF to be Arduino bootload-able, so it can be uploaded straight into an Arduino without a programmer. I think that would make it much more accessible, and would have saved me quite a bit of faffing about. |
From: Mikael N. <mik...@fl...> - 2018-09-14 18:51:33
|
That would be great, but sadly that kind operation is not supported by the Arduino bootloader. On 2018-07-26 00:11, hc wrote: > I think it would be beneficial for FF to be Arduino bootload-able, so > it can be > uploaded straight into an Arduino without a programmer. I think that > would > make it much more accessible, and would have saved me quite a bit of > faffing > about. > |
From: hc <ml...@i2...> - 2018-09-14 23:23:41
|
What operation do you mean? As I understand it, the bootloader (https://github.com/Optiboot/optiboot) is generic (not arduino specific) and just loads the binary into the absolute addresses, except for the coldstart reset vector. As long as FF is compiled below the bootloader area ( top 512 bytes), it should load, and get run by the bootloader. Perhaps some of the flags mapping the bootload area have to be adjusted. On Saturday, 15 September 2018 06:51:23 NZST Mikael Nordman wrote: > That would be great, but sadly that kind operation is not supported by > the Arduino bootloader. > > On 2018-07-26 00:11, hc wrote: > > I think it would be beneficial for FF to be Arduino bootload-able, so > > it can be > > uploaded straight into an Arduino without a programmer. I think that > > would > > make it much more accessible, and would have saved me quite a bit of > > faffing > > about. > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: Mikael N. <mik...@fl...> - 2018-09-15 06:12:43
|
FlashForth needs to write to flash in order to compile new words. Normally the bootloaders are set up so that only the bootloader can write to flash. And the bootloaders do not have an interface enabling the application code to write to flash. Of course one could write special bootloader that offers what is needed. But then you anyway need to program the bootloader first into the chip. On 2018-09-15 00:58, hc wrote: > What operation do you mean? > > As I understand it, the bootloader > (https://github.com/Optiboot/optiboot) is > generic (not arduino specific) and just loads the binary into the > absolute > addresses, except for the coldstart reset vector. > > As long as FF is compiled below the bootloader area ( top 512 bytes), > it > should load, and get run by the bootloader. > Perhaps some of the flags mapping the bootload area have to be > adjusted. > |
From: hc <ml...@i2...> - 2018-09-19 20:30:45
|
Ah I understand. There are patches to Optiboot from 2015 that export the flash writing routine, and MCUDude has binaries. https://github.com/MCUdude/optiboot_flash "There is a jump table at the beginning of bootloader, so regardless of real address of do_spm function you can just jump to second instruction (+2B) after bootloader start. See here how it can be done in C: " https://github.com/MCUdude/MiniCore/tree/master/avr/libraries/Optiboot_flasher Of course, those don't seem to be what is coming from the factory in an arduino board, so they still need the initial flashing, somewhat defeating what I was hoping for. It would however make it possible to make a single FF binary with arduino bootloader, so it could come from the factory with FF, be usable as arduino, and FF could be reloaded or upgraded at any time thereafter without a profgrammer. It would also mean that for a potential user, reflashing would not mean bricking it for arduino use. On Saturday, 15 September 2018 18:12:32 NZST Mikael Nordman wrote: > FlashForth needs to write to flash in order to compile new words. > > Normally the bootloaders are set up so that only the bootloader can > write to flash. > And the bootloaders do not have an interface enabling the application > code to write to flash. > > Of course one could write special bootloader that offers what is needed. > But then you anyway need to program the bootloader first into the chip. > > On 2018-09-15 00:58, hc wrote: > > What operation do you mean? > > > > As I understand it, the bootloader > > (https://github.com/Optiboot/optiboot) is > > generic (not arduino specific) and just loads the binary into the > > absolute > > addresses, except for the coldstart reset vector. > > > > As long as FF is compiled below the bootloader area ( top 512 bytes), > > it > > should load, and get run by the bootloader. > > Perhaps some of the flags mapping the bootload area have to be > > adjusted. > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |