Skip to content

Commit

Permalink
AMC - fix programmed packets count (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidetome authored Mar 15, 2024
1 parent ca908be commit 5b1379d
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -661,17 +661,27 @@ static uint8_t s_uprot_proc_PROGRAM(eOuprot_opcodes_t opc, uint8_t *pktin, uint1
bool itisaflashaddress = embot::hw::flash::isvalid(address);
if(false == itisaflashaddress)
{
#if defined(TEST_prog_mode)
#if defined(TEST_prog_mode)
snprintf(debug_print, sizeof(debug_print), "dropping non flash chunk adr = 0x%x, size = %d", address, size);
embot::core::print(debug_print);
#endif
#endif

// i just drop the action because it must be a ram address
// but i increment the number of processed packets
++s_proc_PROG_rxpackets;
// and force a return w/ no error

// Commenting out line 678 and adding 683 fixes the programming result of AMC cm7 and cm4 cores;
// leaving it causes an error message even if the programming went well
// see :
// - https://github.com/robotology/icub-main/issues/950
//

//++s_proc_PROG_rxpackets; // and force a return w/ no error
break;
}

else
{
++s_proc_PROG_rxpackets;
}

const embot::hw::flash::Partition& pp = embot::hw::sys::partition(address);

Expand Down

0 comments on commit 5b1379d

Please sign in to comment.