Skip to content

Commit fabfa84

Browse files
committed
add hal_init to the imx test-app and trigger update
1 parent 053b1ba commit fabfa84

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test-app/app_imx_rt.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ void rt1050_init_pins(void)
124124

125125
void main(void)
126126
{
127+
hal_init();
128+
if (wolfBoot_current_firmware_version() == 1) {
129+
wolfBoot_update_trigger();
130+
return;
131+
}
132+
127133
imx_rt_init_boot_clock();
128134
#if defined(CPU_MIMXRT1062DVL6A) || defined(CPU_MIMXRT1064DVL6A)
129135
rt1060_init_pins();
@@ -137,11 +143,6 @@ void main(void)
137143
PRINTF("wolfBoot Test app, version = %d\r\n",
138144
wolfBoot_current_firmware_version());
139145

140-
/* enable to test update trigger on reboot */
141-
#if 0
142-
wolfBoot_update_trigger();
143-
#endif
144-
145146
while (1) {
146147
/* 100ms delay */
147148
SDK_DelayAtLeastUs(100 * 1000, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);

0 commit comments

Comments
 (0)