Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hal_init to the imx test-app and trigger update #352

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

jpbland1
Copy link
Contributor

ZD 16472

@jpbland1 jpbland1 requested a review from dgarske August 21, 2023 21:41
@jpbland1 jpbland1 self-assigned this Aug 21, 2023
@jpbland1 jpbland1 marked this pull request as ready for review August 21, 2023 21:41
@@ -124,6 +124,12 @@ void rt1050_init_pins(void)

void main(void)
{
hal_init();
if (wolfBoot_current_firmware_version() == 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move this down after:

PRINTF("wolfBoot Test app, version = %d\r\n",
         wolfBoot_current_firmware_version());

@@ -124,6 +124,12 @@ void rt1050_init_pins(void)

void main(void)
{
hal_init();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

	[CC-ARM] app_imx_rt.o
app_imx_rt.c: In function 'main':
app_imx_rt.c:127:5: warning: implicit declaration of function 'hal_init' [-Wimplicit-function-declaration]
  127 |     hal_init();
      |     ^~~~~~~~```

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it actually wasn't calling hal_init that was required, I needed to move the wolfBoot_update_trigger to before the SysTick_Config call, it seems to mess with hal_flash_write

@jpbland1 jpbland1 requested a review from dgarske August 22, 2023 03:58
#endif
if (wolfBoot_current_firmware_version() == 1) {
wolfBoot_update_trigger();
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check indent

return;
}

SysTick_Config(SystemCoreClock / 1000U);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the SysTick is causing the issue please add a code comment here. See if it works without it or if it is actually needed for the delay. Can init_debug_console still be moved up, is it really required to be in the example? Does the PRINTF("wolfBoot Test app still work?

@jpbland1
Copy link
Contributor Author

it seems SysTick isn't required and the print statements still work without it, I've removed it and cleaned up the test-app

@jpbland1 jpbland1 requested a review from dgarske August 22, 2023 14:25
@dgarske dgarske merged commit 6bb05d5 into wolfSSL:master Aug 22, 2023
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants