This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hercules Bootloader - Fails for 'Larger Files'?

Hello All,

I have been using the bootloader - with bin file sizes around 60-70K or so - all is well; but for a larger file size - say 150K-170K - it just kicks out and goes back to the main prompt screen.

I saw the discussion about the file path could be too long - but I have moved that to the \tmp\ dir to check that - and does the same thing plus I thought that bug had been fixed.

Anyone else seeing this?

Thanks In Advance,
johnw

  • "Asked and answered counselor.", said Malory Duchess Archer.

    OK - so I accidentally put the g_ulUpdateStatusAddr value in range of what was programmed - which explains why the program was hanging. When it tried to program that area - it was already programmed and couldn't write a new value; and it was hanging on status.

    Obvious enhancement here is to check you don't put that in a bad spot.
  • I obviously put the status word in a non-contiguous part of memory - here is the code snippet I added at the end of Fapi_BlockErase() in bl_flash.c:

    // but we have to erase the Status Word - and it isn't contiguous - not in our implementation anyway

    #if STATUS_WORD_NOT_CONTIGUOUS

    if ( g_ulUpdateStatusAddr == (uint32_t) 0x2FFFC0 ) { // nothing fancy - hardcode this for now

    j = 11;
    // we are at the end of the last sector in bank 1
    eraseStartAddr = flash_sector[j].start;

    status = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, eraseStartAddr);
    while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy );
    while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);

    status = Flash_Erase_Check((uint32_t)eraseStartAddr, flash_sector[j].length);

    } else {

    UART_putString(UART, "\r Status Area Not Erased - Programming Will Hang. \n\n");

    }
    #endif


    return (status);
    }

    Regards,
    johnw
  • John,

    Thank you for posting the issue and the solution.
  • Hello Bob,

    You are more than welcome. ;)

    Regards,
    John W.