Skip to content

Commit

Permalink
(fw) Enable FW mode at start.
Browse files Browse the repository at this point in the history
     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 <[email protected]>
  • Loading branch information
secworks authored and dehanj committed Nov 15, 2024
1 parent 23348d3 commit ad18c33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/application_fpga/fw/tk1/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit ad18c33

Please sign in to comment.