Menu

FF on EasyAVR128 board by 'LogiFind'

2020-01-03
2020-01-05
  • Andrew Biner

    Andrew Biner - 2020-01-03

    Greetings all,

    I am trying to load FF into an ATmega128A on an EasyAVR128 board made by 'LogiFind'.

    I am not an expert with AVR studio.

    It would be greatly appreciated if anyone could provide some guidance for compiling the flash forth .asm file in AVR studio to get some output files suitable for sending to the ATmega128.

    I have read that the AVR studio assembly language compiler is not suitable for compiling the flash forth assembly file.
    The suggestion was to start a new C/C+ project and include the assembly with within the C project then compile.
    At this stage I have had no success either way.

    Also, the EasyAVR128 board has a CP2102 serial to USB converter on board.
    In the flash forth notes it mentions ""The USB serial emulation requires that you use a PIC18F chip with inbuilt USB tranceiver.""
    Perhaps someone can comment on how the ATmega128 was connected to when running flash forth as I understand this has previously been tested.

    Yours Sincerely (and with hope)
    Andrew

     
  • Mikael Nordman

    Mikael Nordman - 2020-01-03

    If you can get hold of avrstudio 4, it has the needed assembler to (avrasm2.exe).
    I think also that AMForth has the assembler available for download.

    The PIC18 comment is not relevant for the ATmega version.

    The communication to FF from the PC goes as a serial emulation connection via the CP2102.
    When you compile FF you have to define which of the 2 ATmega UARTs is used via CP2102.

    BUT...

    FF cannot be loaded with the EasyAVR128 bootloader. FF will overwrite any bootloader.
    You need a hardware device programmer in order to load FF to your board.

    BR

     
    • Andrew Biner

      Andrew Biner - 2020-01-04

      Brilliant.
      Thanks very much for your help.
      I will try to get AVR Studio 4 downloaded.
      For programming I have AVRISP MK2 via the ISP port.
      Current version of AVR Studio communicates with EasyAVR128 board ok.
      Thanks again.
      Regards
      Andrew

      On Fri, 3 Jan 2020, 19:13 Mikael Nordman, oh2aun@users.sourceforge.net
      wrote:

      If you can get hold of avrstudio 4, it has the needed assembler to
      (avrasm2.exe).
      I think also that AMForth has the assembler available for download.

      The PIC18 comment is not relevant for the ATmega version.

      The communication to FF from the PC goes as a serial emulation connection
      via the CP2102.
      When you compile FF you have to define which of the 2 ATmega UARTs is used
      via CP2102.

      BUT...

      FF cannot be loaded with the EasyAVR128 bootloader. FF will overwrite any
      bootloader.
      You need a hardware device programmer in order to load FF to your board.

      BR

      FF on EasyAVR128 board by 'LogiFind'
      https://sourceforge.net/p/flashforth/discussion/726813/thread/300a35b987/?limit=25#1007


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/flashforth/discussion/726813/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Simon Bridger

    Simon Bridger - 2020-01-05

    I'll just bump up the idea of making FF-AVR bootloadable again, in case anyone is doing some work on FF-AVR, and feels like trying.

    I think it would be great for FF to be arduino loadable.

    It would 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 programmer.
    It would also mean that for a potential user, reflashing an arduino to FF would not mean bricking it for arduino use.

    As I understand it:
    - FF address needs to be moved so it isn't on top of the bootloader
    - Only the bootloader can write flash, so FF needs to use the bootloader calls to write
    - Optiboot is needed to support writes (older bootloaders don't)

    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

     

Log in to post a comment.