(fw) Enable FW mode at start.

FW mode must now be explicitlty enabled. App mode will be
     automatically enabled when jumping to the start of the loaded
     application.

Signed-off-by: Joachim Strömbergson <joachim@assured.se>
This commit is contained in:
Joachim Strömbergson 2024-08-28 14:06:04 +02:00 committed by Daniel Jobson
parent 23348d3f86
commit ad18c333af
No known key found for this signature in database
GPG Key ID: 3707A9DBF4BB8F1A

View File

@ -342,9 +342,6 @@ static void run(const struct context *ctx)
#endif
// clang-format on
// Flip over to application mode
*switch_app = 1;
// XXX Firmware stack now no longer available
// Don't use any function calls!
@ -399,6 +396,9 @@ int main(void)
uint8_t cmd[CMDLEN_MAXBYTES] = {0};
enum state state = FW_STATE_INITIAL;
// Enable FW mode.
*switch_app = 0;
print_hw_version();
// Let the app know the function adddress for blake2s()