Skip to content

Commit c02c273

Browse files
authored
Merge pull request #624 from gojimmypi/pr-detect-user-settings
Hard fail if the wrong user settings is detected
2 parents a8afa74 + f198c6b commit c02c273

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

hal/library.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
#undef NO_FILESYSTEM
4747
#endif
4848

49+
#ifdef WOLFBOOT_KEYTOOLS
50+
/* this code needs to use the Use ./include/user_settings.h file */
51+
#error "The wrong user_settings.h has been included."
52+
#endif
53+
54+
4955
/* HAL Stubs */
5056
void hal_init(void)
5157
{

src/image.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
#include <stdio.h>
3131
#endif
3232
#include <wolfssl/wolfcrypt/settings.h> /* for wolfCrypt hash/sign routines */
33+
#ifdef WOLFBOOT_KEYTOOLS
34+
/* this code needs to use the Use ./include/user_settings.h, not keytools */
35+
#error "The wrong user_settings.h has been included."
36+
#endif
37+
3338

3439
#include <stddef.h>
3540
#include <string.h>

0 commit comments

Comments
 (0)