Is there anything wrong with this strategy? . . . .
All Bank 1..5 code modules begin with code similar to this:
where SKETCHF is a constant whose value depends upon the target bank: 1111 for Bank 1, 2222 for Bank 2, etc.
The idea is to compile a Bank 1..5 to flash, prevent it's running (since arguments aren't valid since it hasn't been called) and effectively perform a soft reset to Bank 0 so the application is up and running with the new Bank 1..5 code.
But this results in a Workshop error message: "Failed to execute the program."
Still, it appears to work as I'd hoped. I'm assuming that I can ignore this message?
If I insert the statement: pause(1); before the if statement, I don't get the error message.
Thanks,
Hunter
All Bank 1..5 code modules begin with code similar to this:
Code:
func main(var f) if(f != SKETCHF) flash_Run(FLASHBANK_0);
The idea is to compile a Bank 1..5 to flash, prevent it's running (since arguments aren't valid since it hasn't been called) and effectively perform a soft reset to Bank 0 so the application is up and running with the new Bank 1..5 code.
But this results in a Workshop error message: "Failed to execute the program."
Still, it appears to work as I'd hoped. I'm assuming that I can ignore this message?
If I insert the statement: pause(1); before the if statement, I don't get the error message.
Thanks,
Hunter
Comment