From 486e6330691e1521d4d10c8d52f89ffb7ede4d3e Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Fri, 27 Mar 2020 14:34:20 +0100 Subject: [PATCH] Example workspace/project to build under IAR --- IDE/IAR/keys/ecc256.der | 1 + IDE/IAR/keys/ecc256_pub_key.c | 20 + IDE/IAR/settings/wolfBoot.wsdt | 533 ++++ IDE/IAR/settings/wolfboot.Debug.cspy.bat | 40 + IDE/IAR/settings/wolfboot.Debug.cspy.ps1 | 31 + IDE/IAR/settings/wolfboot.Debug.driver.xcl | 19 + IDE/IAR/settings/wolfboot.Debug.general.xcl | 13 + IDE/IAR/settings/wolfboot.crun | 13 + IDE/IAR/settings/wolfboot.dbgdt | 4 + IDE/IAR/settings/wolfboot.dnx | 58 + IDE/IAR/wolfBoot.eww | 7 + IDE/IAR/wolfboot.dep | 301 ++ IDE/IAR/wolfboot.ewd | 2974 +++++++++++++++++++ IDE/IAR/wolfboot.ewp | 2223 ++++++++++++++ IDE/IAR/wolfboot.ewt | 2875 ++++++++++++++++++ hal/stm32f4.c | 2 +- lib/wolfssl | 2 +- src/string.c | 7 + src/xmalloc_ecc.c | 2 +- 19 files changed, 9122 insertions(+), 3 deletions(-) create mode 100644 IDE/IAR/keys/ecc256.der create mode 100644 IDE/IAR/keys/ecc256_pub_key.c create mode 100644 IDE/IAR/settings/wolfBoot.wsdt create mode 100644 IDE/IAR/settings/wolfboot.Debug.cspy.bat create mode 100644 IDE/IAR/settings/wolfboot.Debug.cspy.ps1 create mode 100644 IDE/IAR/settings/wolfboot.Debug.driver.xcl create mode 100644 IDE/IAR/settings/wolfboot.Debug.general.xcl create mode 100644 IDE/IAR/settings/wolfboot.crun create mode 100644 IDE/IAR/settings/wolfboot.dbgdt create mode 100644 IDE/IAR/settings/wolfboot.dnx create mode 100644 IDE/IAR/wolfBoot.eww create mode 100644 IDE/IAR/wolfboot.dep create mode 100644 IDE/IAR/wolfboot.ewd create mode 100644 IDE/IAR/wolfboot.ewp create mode 100644 IDE/IAR/wolfboot.ewt diff --git a/IDE/IAR/keys/ecc256.der b/IDE/IAR/keys/ecc256.der new file mode 100644 index 00000000..085721bd --- /dev/null +++ b/IDE/IAR/keys/ecc256.der @@ -0,0 +1 @@ +wJ>ߑ`+. l])|Z6@iDIIUFG4/#+g ?U3d*jK1Է޴[8/r}ѩ \ No newline at end of file diff --git a/IDE/IAR/keys/ecc256_pub_key.c b/IDE/IAR/keys/ecc256_pub_key.c new file mode 100644 index 00000000..7d27a730 --- /dev/null +++ b/IDE/IAR/keys/ecc256_pub_key.c @@ -0,0 +1,20 @@ +/* + * This file has been generated and contains the public key which is + * used by wolfBoot to verify the updates. + */ +#include + +#warning "USING PRE-GENERATED EXAMPLE ECC KEY -- BOOTLOADER IS NOT SECURE!" + + +const uint8_t ecc256_pub_key[64] = { + 0xFA, 0x77, 0xAE, 0xC6, 0x4A, 0x3E, 0xDF, 0x91, +0x60, 0x2B, 0x2E, 0x83, 0x12, 0x0C, 0x6C, 0x91, +0x8C, 0x5D, 0xC2, 0x29, 0x7C, 0xB8, 0x91, 0xEA, +0x5A, 0x12, 0xE0, 0x8E, 0x36, 0x40, 0x69, 0x8D, +0xE1, 0xDC, 0xF6, 0x44, 0x7F, 0xD9, 0x16, 0x49, +0x49, 0x55, 0x1F, 0x46, 0x47, 0xB7, 0x83, 0x34, +0x04, 0x2F, 0x9B, 0x23, 0x2B, 0x84, 0x67, 0x09, +0x3F, 0xFC, 0xCE, 0x55, 0x33, 0x64, 0xCB, 0xE8 +}; +const uint32_t ecc256_pub_key_len = 64; diff --git a/IDE/IAR/settings/wolfBoot.wsdt b/IDE/IAR/settings/wolfBoot.wsdt new file mode 100644 index 00000000..95914223 --- /dev/null +++ b/IDE/IAR/settings/wolfBoot.wsdt @@ -0,0 +1,533 @@ + + + + + wolfboot/Debug + + + + + + 21 + 993 + 264 + 66 + 2 + $PROJ_DIR$\BuildLog.log + 0 + -1 + + + + 34001 + 0 + + + + + 57600 + 57601 + 57603 + 33024 + 0 + 57607 + 0 + 57635 + 57634 + 57637 + 0 + 57643 + 57644 + 0 + 33090 + 33057 + 57636 + 57640 + 57641 + 33026 + 33065 + 33063 + 33064 + 33053 + 33054 + 0 + 33035 + 33036 + 34399 + 0 + 33038 + 33039 + 0 + + + + + 190 + 30 + 30 + 30 + + + wolfboot + wolfboot/keys + + + + 4 + 0 + + + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 3A000000230040E1000001000000138600008E000000108600000100000007E100000100000029E1000001000000018100000700000053920000010000000F8100000100000020810000010000005F860000040000000D8000000100000001E10000010000000384000001000000178100000100000056860000010000001481000001000000259200000100000004B00000010000000081000011000000449200000100000003E10000030000005E860000030000000E8100000D0000001F8100000100000000E100000100000014860000010000001681000001000000028400000200000005810000010000001186000002000000468100000100000054920000020000000D81000001000000198600000100000024E1000003000000 + + + 3000FFFFFFFF2AE10000008200001C820000018200000D8400000F8400000884000054840000328100001C810000098400003C8400003D840000408400004C8400003E8400004B8400004D8400003F8400003A8400003B8400005A8400005B8400000E8400003084000004840000068400005384000032840000778400000784000002840000038400001084000005840000318400000A840000808C000044D50000498100004A8100002F8200001682000018820000198200006786000051840000 + 1E0015810000210000002CE100003F00000007E1000037000000239200000000000004E10000350000000F8100001F00000020810000270000005F860000300000000D8000001300000001E100003200000023E10000390000000C8100001C000000178100002300000014810000200000002BE100003E000000008400000B000000008100001500000003E100003400000025E100003B0000000E8100001E0000001F8100002600000000E100003100000022E10000380000000B8100001B00000041E1000041000000D18400000C000000168100002200000005E100003600000002E10000330000000D8100001D000000 + + + 0 + 0A0000000A0000006E0000006E000000 + 00000000AE02000056050000C1020000 + 4096 + 0 + 0 + 32767 + 0 + + + 1 + + + 4294967295 + 000000004501000056050000C5020000 + 000000002E01000056050000AE020000 + 4096 + 0 + 0 + 32767 + 0 + + + 1 + + + 34048 + 000000001700000022010000C8000000 + 04000000460100005205000094020000 + 32768 + 0 + 0 + 32767 + 0 + + + 1 + + + 34053 + 000000001700000022010000C8000000 + 04000000460100005205000094020000 + 4096 + 0 + 0 + 32767 + 0 + + + 1 + + + 24 + 1313 + 2 + + 0 + -1 + + + 34054 + 000000001700000022010000C8000000 + 04000000460100005205000094020000 + 4096 + 0 + 0 + 32767 + 0 + + + 0 + + + 473 + 67 + 812 + 2 + + 0 + -1 + + + 34055 + 000000001700000022010000C8000000 + 04000000460100005205000094020000 + 4096 + 0 + 0 + 32767 + 0 + + + 0 + + + 473 + 67 + 812 + 2 + + 0 + -1 + + + 34056 + 000000001700000022010000C8000000 + 04000000460100005205000094020000 + 4096 + 0 + 0 + 32767 + 0 + + + 0 + + + 406 + 67 + 609 + 270 + 2 + + 0 + -1 + + + 34057 + 000000001700000022010000C8000000 + 04000000460100005205000094020000 + 4096 + 0 + 0 + 32767 + 0 + + + 0 + + + 473 + 67 + 812 + 2 + + 0 + -1 + + + 34060 + 000000001700000022010000C8000000 + 04000000460100005205000094020000 + 4096 + 0 + 0 + 32767 + 0 + + + 0 + + + 2 + + 0 + -1 + + + 34051 + 000000001700000080020000A8000000 + 00000000000000008002000091000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + + 2 + + + + + + + + + <Right-click on a symbol in the editor to show a call graph> + + + + + + 0 + + + 0 + + + + + + 0 + + + 0 + + + File + Function + Line + + + 200 + 700 + 100 + + + + 34052 + 000000001700000022010000C8000000 + 000000000000000022010000B1000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + + Check + File + Line + Message + Severity + + + 200 + 200 + 100 + 500 + 100 + + + + 34058 + 000000001700000022010000C8000000 + 000000000000000022010000B1000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + 2 + $WS_DIR/SourceBrowseLog.log + 0 + -1 + + + 34059 + 000000001700000080020000A8000000 + 00000000000000008002000091000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + + 2 + + + 0 + + + C:\Users\dan\wolfboot\IDE\IAR\Debug\Obj\wolfboot.pbw + + + File + Name + Scope + Symbol type + + + 300 + 300 + 300 + 300 + + + + 34061 + 00000000170000000601000078010000 + 0000000032000000060100002A010000 + 4096 + 0 + 0 + 32767 + 0 + + + 1 + + + 0000000014000000000000000010000001000000FFFFFFFFFFFFFFFF06010000320000000A0100002A0100000100000002000010040000000100000000000000000000000D85000000000000000000000000000000000000010000000D850000010000000D850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000B85000000000000000000000000000000000000010000000B850000010000000B850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000A85000000000000000000000000000000000000010000000A850000010000000A850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000048500000000000000000000000000000000000001000000048500000100000004850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000038500000000000000000000000000000000000001000000038500000100000003850000000000000080000001000000FFFFFFFFFFFFFFFF000000002A010000560500002E0100000100000001000010040000000100000054FFFFFF85010000FFFFFFFF070000000085000005850000068500000785000008850000098500000C850000FFFF02000B004354616262656450616E650080000001000000000000004501000056050000C5020000000000002E01000056050000AE020000000000004080005607000000FFFEFF054200750069006C006400010000000085000001000000FFFFFFFFFFFFFFFFFFFEFF094400650062007500670020004C006F006700010000000585000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300000000000685000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000000785000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000000885000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000000985000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000000C85000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFF0085000001000000FFFFFFFF00850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000118500000000000000000000000000000000000001000000118500000100000011850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000108500000000000000000000000000000000000001000000108500000100000010850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000F85000000000000000000000000000000000000010000000F850000010000000F850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000E85000000000000000000000000000000000000010000000E850000010000000E850000000000000000000000000000 + + + CMSIS-Pack + 00200000010000000100FFFF01001100434D4643546F6F6C426172427574746F6ED1840000000000000C000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF0A43004D005300490053002D005000610063006B0018000000 + + + 34049 + 0A0000000A0000006E0000006E000000 + FE020000000000002C0300001A000000 + 8192 + 0 + 0 + 24 + 0 + + + 1 + + + Main + 00200000010000002000FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000031000000FFFEFF000000000000000000000000000100000001000000018001E100000000000032000000FFFEFF000000000000000000000000000100000001000000018003E100000000040034000000FFFEFF0000000000000000000000000001000000010000000180008100000000000015000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E100000000040037000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E100000000040039000000FFFEFF000000000000000000000000000100000001000000018022E100000000040038000000FFFEFF000000000000000000000000000100000001000000018025E10000000004003B000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE10000000004003E000000FFFEFF00000000000000000000000000010000000100000001802CE10000000004003F000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01000D005061737465436F6D626F426F784281000000000400FFFFFFFFFFFEFF0000000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000100FFFEFF0B48004100560045005F00530050005F00450043004300000000000180218100000000040028000000FFFEFF000000000000000000000000000100000001000000018024E10000000004003A000000FFFEFF000000000000000000000000000100000001000000018028E10000000004003C000000FFFEFF000000000000000000000000000100000001000000018029E10000000004003D000000FFFEFF0000000000000000000000000001000000010000000180028100000000040017000000FFFEFF000000000000000000000000000100000001000000018029810000000004002C000000FFFEFF000000000000000000000000000100000001000000018027810000000004002A000000FFFEFF000000000000000000000000000100000001000000018028810000000004002B000000FFFEFF00000000000000000000000000010000000100000001801D8100000000000024000000FFFEFF00000000000000000000000000010000000100000001801E8100000000040025000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B810000000004001B000000FFFEFF00000000000000000000000000010000000100000001800C810000000000001C000000FFFEFF00000000000000000000000000010000000100000001805F8600000000000030000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800E810000000000001E000000FFFEFF00000000000000000000000000010000000100000001800F810000000000001F000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00E8020000 + + + 34050 + 0A0000000A0000006E0000006E000000 + 0000000000000000FE0200001A000000 + 8192 + 0 + 0 + 744 + 0 + + + 1 + + + 34062 + 000000001700000022010000C8000000 + 000000000000000022010000B1000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + + 34063 + 000000001700000022010000C8000000 + 000000000000000022010000B1000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + + 34064 + 000000001700000022010000C8000000 + 000000000000000022010000B1000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + + 34065 + 000000001700000022010000C8000000 + 000000000000000022010000B1000000 + 32768 + 0 + 0 + 32767 + 0 + + + 0 + + + + + 34048 + 34049 + 34050 + 34051 + 34052 + 34053 + 34054 + 34055 + 34056 + 34057 + 34058 + 34059 + 34060 + 34061 + 34062 + 34063 + 34064 + 34065 + + + + 010000000300000001000000000000000000000001000000010000000200000000000000010000000100000000000000280000002800000001000000070000000600000001000000FFFEFF2E2400570053005F0044004900520024005C002E002E005C002E002E005C006C00690062005C0077006F006C006600730073006C005C0077006F006C006600630072007900700074005C007300720063005C006500630063002E00630001000000FFFF010014004966436F6E74656E7453746F72616765496D706CFFFEFF00FFFEFFFF25013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00320033003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E003900330035003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E003900330035003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF056500630063002E00630000000000FFFFFFFFFFFFFFFFFFFEFF202400570053005F0044004900520024005C002E002E005C002E002E005C0069006E0063006C007500640065005C007300700069005F006400720076002E006800010000000180FFFEFF00FFFEFFFF27013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00310032003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0031003200310034003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0031003200310034003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF097300700069005F006400720076002E00680000000000FFFFFFFFFFFFFFFFFFFEFF1C2400570053005F0044004900520024005C002E002E005C002E002E005C00680061006C005C00730074006D0033003200660034002E006300010000000180FFFEFF00FFFEFFFF25013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00320032003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E003900340039003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E003900340039003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF09730074006D0033003200660034002E00630000000000FFFFFFFFFFFFFFFFFFFEFF1B2400570053005F0044004900520024005C002E002E005C002E002E005C007300720063005C0073007400720069006E0067002E006300010000000180FFFEFF00FFFEFFFF28013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E003200310030003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0034003600350032003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0034003600350032003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF0873007400720069006E0067002E00630000000000FFFFFFFFFFFFFFFFFFFEFF202400570053005F0044004900520024005C002E002E005C002E002E005C007300720063005C0078006D0061006C006C006F0063005F006500630063002E006300010000000180FFFEFF00FFFEFFFF27013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00340036003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0031003600310033003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0031003600310033003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF0D78006D0061006C006C006F0063005F006500630063002E00630000000000FFFFFFFFFFFFFFFFFFFEFF1F2400570053005F0044004900520024005C002E002E005C002E002E005C0069006E0063006C007500640065005C007400610072006700650074002E006800010000000180FFFEFF00FFFEFFFF20013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E0037003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0030003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0030003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF087400610072006700650074002E00680000000000FFFFFFFFFFFFFFFFFFFEFF262400570053005F0044004900520024005C002E002E005C002E002E005C0069006E0063006C007500640065005C0075007300650072005F00730065007400740069006E00670073002E006800010000000180FFFEFF00FFFEFFFF27013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00360039003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0031003800370036003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0031003800380037003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF0F75007300650072005F00730065007400740069006E00670073002E00680000000000FFFFFFFFFFFFFFFF0000000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000001000000020000000A010000490000005605000041010000 + + + + diff --git a/IDE/IAR/settings/wolfboot.Debug.cspy.bat b/IDE/IAR/settings/wolfboot.Debug.cspy.bat new file mode 100644 index 00000000..f2a0b9da --- /dev/null +++ b/IDE/IAR/settings/wolfboot.Debug.cspy.bat @@ -0,0 +1,40 @@ +@REM This batch file has been generated by the IAR Embedded Workbench +@REM C-SPY Debugger, as an aid to preparing a command line for running +@REM the cspybat command line utility using the appropriate settings. +@REM +@REM Note that this file is generated every time a new debug session +@REM is initialized, so you may want to move or rename the file before +@REM making changes. +@REM +@REM You can launch cspybat by typing the name of this batch file followed +@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). +@REM +@REM Read about available command line parameters in the C-SPY Debugging +@REM Guide. Hints about additional command line parameters that may be +@REM useful in specific cases: +@REM --download_only Downloads a code image without starting a debug +@REM session afterwards. +@REM --silent Omits the sign-on message. +@REM --timeout Limits the maximum allowed execution time. +@REM + + +@echo off + +if not "%~1" == "" goto debugFile + +@echo on + +"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\common\bin\cspybat" -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.general.xcl" --backend -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.driver.xcl" + +@echo off +goto end + +:debugFile + +@echo on + +"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\common\bin\cspybat" -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.general.xcl" "--debug_file=%~1" --backend -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.driver.xcl" + +@echo off +:end \ No newline at end of file diff --git a/IDE/IAR/settings/wolfboot.Debug.cspy.ps1 b/IDE/IAR/settings/wolfboot.Debug.cspy.ps1 new file mode 100644 index 00000000..b27b1e61 --- /dev/null +++ b/IDE/IAR/settings/wolfboot.Debug.cspy.ps1 @@ -0,0 +1,31 @@ +param([String]$debugfile = ""); + +# This powershell file has been generated by the IAR Embedded Workbench +# C - SPY Debugger, as an aid to preparing a command line for running +# the cspybat command line utility using the appropriate settings. +# +# Note that this file is generated every time a new debug session +# is initialized, so you may want to move or rename the file before +# making changes. +# +# You can launch cspybat by typing Powershell.exe -File followed by the name of this batch file, followed +# by the name of the debug file (usually an ELF / DWARF or UBROF file). +# +# Read about available command line parameters in the C - SPY Debugging +# Guide. Hints about additional command line parameters that may be +# useful in specific cases : +# --download_only Downloads a code image without starting a debug +# session afterwards. +# --silent Omits the sign - on message. +# --timeout Limits the maximum allowed execution time. +# + + +if ($debugfile -eq "") +{ +& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\common\bin\cspybat" -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.general.xcl" --backend -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.driver.xcl" +} +else +{ +& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\common\bin\cspybat" -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.general.xcl" --debug_file=$debugfile --backend -f "C:\Users\dan\wolfboot\IDE\IAR\settings\wolfboot.Debug.driver.xcl" +} diff --git a/IDE/IAR/settings/wolfboot.Debug.driver.xcl b/IDE/IAR/settings/wolfboot.Debug.driver.xcl new file mode 100644 index 00000000..d67645ad --- /dev/null +++ b/IDE/IAR/settings/wolfboot.Debug.driver.xcl @@ -0,0 +1,19 @@ +"--endian=little" + +"--cpu=Cortex-M4" + +"--fpu=None" + +"-p" + +"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\CONFIG\debugger\ST\STM32F407VG.ddf" + +"--semihosting=none" + +"--device=STM32F407VG" + +"--multicore_nr_of_cores=1" + + + + diff --git a/IDE/IAR/settings/wolfboot.Debug.general.xcl b/IDE/IAR/settings/wolfboot.Debug.general.xcl new file mode 100644 index 00000000..44390155 --- /dev/null +++ b/IDE/IAR/settings/wolfboot.Debug.general.xcl @@ -0,0 +1,13 @@ +"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armproc.dll" + +"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armsim2.dll" + +"C:\Users\dan\wolfboot\IDE\IAR\Debug\Exe\wolfboot.out" + +--plugin="C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armbat.dll" + +--device_macro="C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\debugger\ST\STM32F4xx.dmac" + + + + diff --git a/IDE/IAR/settings/wolfboot.crun b/IDE/IAR/settings/wolfboot.crun new file mode 100644 index 00000000..62c21bb9 --- /dev/null +++ b/IDE/IAR/settings/wolfboot.crun @@ -0,0 +1,13 @@ + + + 1 + + + * + * + * + 0 + 1 + + + diff --git a/IDE/IAR/settings/wolfboot.dbgdt b/IDE/IAR/settings/wolfboot.dbgdt new file mode 100644 index 00000000..7a993b0f --- /dev/null +++ b/IDE/IAR/settings/wolfboot.dbgdt @@ -0,0 +1,4 @@ + + + + diff --git a/IDE/IAR/settings/wolfboot.dnx b/IDE/IAR/settings/wolfboot.dnx new file mode 100644 index 00000000..3a4c4828 --- /dev/null +++ b/IDE/IAR/settings/wolfboot.dnx @@ -0,0 +1,58 @@ + + + + 0 + 1 + 90 + 1 + 1 + 1 + main + 0 + 50 + + + 0 + 1 + + + 0 + 0 + 1 + 0 + 1 + 0 + + + 0 + 0 + 1 + 0 + 1 + + + 0 + + + 0 + + + 1 + + + 1 + 0 + 1 + 0 + 1 + + + 0 + 0 + + + 10000000 + 0 + 1 + + diff --git a/IDE/IAR/wolfBoot.eww b/IDE/IAR/wolfBoot.eww new file mode 100644 index 00000000..5c08246c --- /dev/null +++ b/IDE/IAR/wolfBoot.eww @@ -0,0 +1,7 @@ + + + + $WS_DIR$\wolfboot.ewp + + + diff --git a/IDE/IAR/wolfboot.dep b/IDE/IAR/wolfboot.dep new file mode 100644 index 00000000..9c131568 --- /dev/null +++ b/IDE/IAR/wolfboot.dep @@ -0,0 +1,301 @@ + + + 4 + 2162361655 + + Debug + + $PROJ_DIR$\Debug\Obj\libwolfboot.o + $PROJ_DIR$\Debug\Obj\update_flash.o + $PROJ_DIR$\Debug\Obj\image.xcl + $PROJ_DIR$\..\..\src\image.c + $PROJ_DIR$\..\..\src\update_flash.c + $PROJ_DIR$\..\..\src\xmalloc_ecc.c + $PROJ_DIR$\Debug\Obj\image.o + $PROJ_DIR$\Debug\Obj\libwolfboot.xcl + $PROJ_DIR$\Debug\Obj\boot_arm.o + $PROJ_DIR$\Debug\Obj\loader.xcl + $PROJ_DIR$\Debug\Obj\update_flash.xcl + $PROJ_DIR$\Debug\Obj\xmalloc_ecc.xcl + $PROJ_DIR$\..\..\src\boot_arm.c + $PROJ_DIR$\Debug\Obj\string.o + $PROJ_DIR$\Debug\Obj\loader.o + $PROJ_DIR$\Debug\Obj\xmalloc_ecc.o + $PROJ_DIR$\Debug\Obj\string.xcl + $PROJ_DIR$\..\..\src\string.c + $PROJ_DIR$\Debug\Obj\boot_arm.xcl + $PROJ_DIR$\..\..\src\libwolfboot.c + $PROJ_DIR$\..\..\src\loader.c + $PROJ_DIR$\Debug\Obj\ecc256_pub_key.xcl + $PROJ_DIR$\Debug\Obj\ecc256_pub_key.o + $PROJ_DIR$\Debug\Obj\wolfboot.pbd + $PROJ_DIR$\..\..\hal\stm32f4.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\memory.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\ecc.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_int.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\wc_port.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha256.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_cortexm.c + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\hash.c + $PROJ_DIR$\Debug\Exe\wolfboot.out + $PROJ_DIR$\Debug\Obj\sha256.o + $PROJ_DIR$\Debug\Obj\hash.o + $PROJ_DIR$\Debug\Obj\wc_port.o + $PROJ_DIR$\Debug\Obj\ecc.xcl + $PROJ_DIR$\Debug\Obj\hash.xcl + $PROJ_DIR$\Debug\Obj\sp_cortexm.o + $PROJ_DIR$\Debug\Obj\sp_int.o + $PROJ_DIR$\Debug\Obj\ecc.o + $PROJ_DIR$\Debug\Obj\memory.o + $PROJ_DIR$\Debug\Obj\sha.o + $PROJ_DIR$\Debug\Obj\sp_int.xcl + $PROJ_DIR$\Debug\Obj\sha256.xcl + $PROJ_DIR$\Debug\Obj\wc_port.xcl + $PROJ_DIR$\Debug\Obj\sp_cortexm.xcl + $PROJ_DIR$\Debug\Obj\stm32f4.xcl + $PROJ_DIR$\Debug\Obj\memory.xcl + $PROJ_DIR$\Debug\Obj\sha.xcl + $PROJ_DIR$\Debug\Obj\stm32f4.o + $PROJ_DIR$\keys\ecc256_pub_key.c + + + $PROJ_DIR$\..\..\src\image.c + + + ICCARM + 6 + + + BICOMP + 2 + + + + + $PROJ_DIR$\..\..\src\update_flash.c + + + ICCARM + 1 + + + BICOMP + 10 + + + + + $PROJ_DIR$\..\..\src\xmalloc_ecc.c + + + ICCARM + 15 + + + BICOMP + 11 + + + + + $PROJ_DIR$\..\..\src\boot_arm.c + + + ICCARM + 8 + + + BICOMP + 18 + + + + + $PROJ_DIR$\..\..\src\string.c + + + ICCARM + 13 + + + BICOMP + 16 + + + + + $PROJ_DIR$\..\..\src\libwolfboot.c + + + ICCARM + 0 + + + BICOMP + 7 + + + + + $PROJ_DIR$\..\..\src\loader.c + + + ICCARM + 14 + + + BICOMP + 9 + + + + + $PROJ_DIR$\..\..\hal\stm32f4.c + + + ICCARM + 51 + + + BICOMP + 48 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\memory.c + + + ICCARM + 42 + + + BICOMP + 49 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\ecc.c + + + ICCARM + 41 + + + BICOMP + 37 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha.c + + + ICCARM + 43 + + + BICOMP + 50 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_int.c + + + ICCARM + 40 + + + BICOMP + 44 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\wc_port.c + + + ICCARM + 36 + + + BICOMP + 46 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha256.c + + + ICCARM + 34 + + + BICOMP + 45 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_cortexm.c + + + ICCARM + 39 + + + BICOMP + 47 + + + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\hash.c + + + ICCARM + 35 + + + BICOMP + 38 + + + + + [ROOT_NODE] + + + ILINK + 33 + + + + + $PROJ_DIR$\keys\ecc256_pub_key.c + + + ICCARM + 22 + + + BICOMP + 21 + + + + + + Release + + + [MULTI_TOOL] + ILINK + + + diff --git a/IDE/IAR/wolfboot.ewd b/IDE/IAR/wolfboot.ewd new file mode 100644 index 00000000..f0dbc8c2 --- /dev/null +++ b/IDE/IAR/wolfboot.ewd @@ -0,0 +1,2974 @@ + + + 3 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 32 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 1 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 1 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 1 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 32 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + CADI_ID + 2 + + 0 + 1 + 0 + + + + + + + + + CMSISDAP_ID + 2 + + 4 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IJET_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + NULINK_ID + 2 + + 0 + 1 + 0 + + + + + + + PEMICRO_ID + 2 + + 3 + 1 + 0 + + + + + + + + STLINK_ID + 2 + + 7 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + TIFET_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + XDS100_ID + 2 + + 8 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\FreeRtos\FreeRtosArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\HWRTOSplugin\HWRTOSplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin2.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\RemedyRtosViewer\RemedyRtosViewer.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8b.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SMX\smxAwareIarArm8bBE.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/IDE/IAR/wolfboot.ewp b/IDE/IAR/wolfboot.ewp new file mode 100644 index 00000000..261d4b98 --- /dev/null +++ b/IDE/IAR/wolfboot.ewp @@ -0,0 +1,2223 @@ + + + 3 + + Debug + + ARM + + 1 + + General + 3 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 23 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 36 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 10 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + 0 + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 23 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + hal + + spi + + $PROJ_DIR$\..\..\include\spi_drv.h + + + + $PROJ_DIR$\..\..\hal\stm32f4.c + + + + include + + wolfboot + + $PROJ_DIR$\..\..\include\wolfboot\wolfboot.h + + + + $PROJ_DIR$\..\..\include\hal.h + + + $PROJ_DIR$\..\..\include\image.h + + + $PROJ_DIR$\..\..\include\loader.h + + + $PROJ_DIR$\..\..\include\printf.h + + + $PROJ_DIR$\..\..\include\target.h + + + $PROJ_DIR$\..\..\include\user_settings.h + + + + keys + + $PROJ_DIR$\keys\ecc256_pub_key.c + + + + lib + + wolfcrypt + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\ecc.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\hash.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\memory.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha256.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_cortexm.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_int.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\wc_port.c + + + + + src + + $PROJ_DIR$\..\..\src\boot_arm.c + + + $PROJ_DIR$\..\..\src\image.c + + + $PROJ_DIR$\..\..\src\libwolfboot.c + + + $PROJ_DIR$\..\..\src\loader.c + + + $PROJ_DIR$\..\..\src\string.c + + + $PROJ_DIR$\..\..\src\update_flash.c + + + $PROJ_DIR$\..\..\src\xmalloc_ecc.c + + + diff --git a/IDE/IAR/wolfboot.ewt b/IDE/IAR/wolfboot.ewt new file mode 100644 index 00000000..459fae92 --- /dev/null +++ b/IDE/IAR/wolfboot.ewt @@ -0,0 +1,2875 @@ + + + 3 + + Debug + + ARM + + 1 + + C-STAT + 263 + + 263 + + 0 + + 1 + 600 + 1 + 2 + 0 + 1 + 100 + + + 1.7.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RuntimeChecking + 0 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + Release + + ARM + + 0 + + C-STAT + 263 + + 263 + + 0 + + 1 + 600 + 1 + 2 + 0 + 1 + 100 + + + 1.7.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RuntimeChecking + 0 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + hal + + spi + + $PROJ_DIR$\..\..\include\spi_drv.h + + + + $PROJ_DIR$\..\..\hal\stm32f4.c + + + + include + + wolfboot + + $PROJ_DIR$\..\..\include\wolfboot\wolfboot.h + + + + $PROJ_DIR$\..\..\include\hal.h + + + $PROJ_DIR$\..\..\include\image.h + + + $PROJ_DIR$\..\..\include\loader.h + + + $PROJ_DIR$\..\..\include\printf.h + + + $PROJ_DIR$\..\..\include\target.h + + + $PROJ_DIR$\..\..\include\user_settings.h + + + + keys + + $PROJ_DIR$\keys\ecc256_pub_key.c + + + + lib + + wolfcrypt + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\ecc.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\hash.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\memory.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sha256.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_cortexm.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\sp_int.c + + + $PROJ_DIR$\..\..\lib\wolfssl\wolfcrypt\src\wc_port.c + + + + + src + + $PROJ_DIR$\..\..\src\boot_arm.c + + + $PROJ_DIR$\..\..\src\image.c + + + $PROJ_DIR$\..\..\src\libwolfboot.c + + + $PROJ_DIR$\..\..\src\loader.c + + + $PROJ_DIR$\..\..\src\string.c + + + $PROJ_DIR$\..\..\src\update_flash.c + + + $PROJ_DIR$\..\..\src\xmalloc_ecc.c + + + diff --git a/hal/stm32f4.c b/hal/stm32f4.c index 99286178..7aca6ae1 100644 --- a/hal/stm32f4.c +++ b/hal/stm32f4.c @@ -24,7 +24,7 @@ /* STM32 F4 register configuration */ /* Assembly helpers */ -#define DMB() __asm__ volatile ("dmb") +#define DMB() asm volatile ("dmb") /*** RCC ***/ diff --git a/lib/wolfssl b/lib/wolfssl index 1ea77552..3f13b49f 160000 --- a/lib/wolfssl +++ b/lib/wolfssl @@ -1 +1 @@ -Subproject commit 1ea7755232f9901cb6fa015c224004d18a4aa2f2 +Subproject commit 3f13b49fa318fbd3216d7da36d942e7c276d3413 diff --git a/src/string.c b/src/string.c index ca560854..319402c0 100644 --- a/src/string.c +++ b/src/string.c @@ -51,6 +51,7 @@ int isalpha(int c) return (isupper(c) || islower(c)); } +#ifndef __IAR_SYSTEMS_ICC__ void *memset(void *s, int c, size_t n) { unsigned char *d = (unsigned char *)s; @@ -61,6 +62,7 @@ void *memset(void *s, int c, size_t n) return s; } +#endif /* IAR */ char *strcat(char *dest, const char *src) { @@ -166,6 +168,7 @@ int strncmp(const char *s1, const char *s2, size_t n) return diff; } +#ifndef __IAR_SYSTEMS_ICC__ void *memcpy(void *dst, const void *src, size_t n) { size_t i; @@ -178,6 +181,7 @@ void *memcpy(void *dst, const void *src, size_t n) return dst; } +#endif /* IAR */ char *strncpy(char *dst, const char *src, size_t n) { @@ -206,6 +210,7 @@ char *strcpy(char *dst, const char *src) return dst; } + int memcmp(const void *_s1, const void *_s2, size_t n) { int diff = 0; @@ -222,6 +227,7 @@ int memcmp(const void *_s1, const void *_s2, size_t n) return diff; } +#ifndef __IAR_SYSTEMS_ICC__ void *memmove(void *dst, const void *src, size_t n) { int i; @@ -238,3 +244,4 @@ void *memmove(void *dst, const void *src, size_t n) return memcpy(dst, src, n); } } +#endif \ No newline at end of file diff --git a/src/xmalloc_ecc.c b/src/xmalloc_ecc.c index 6b5a52aa..c556d893 100644 --- a/src/xmalloc_ecc.c +++ b/src/xmalloc_ecc.c @@ -48,7 +48,7 @@ #define SP_NORMALIZER_SIZE (128) -static int sp_point_in_use[MAX_POINTS] = { }; +static int sp_point_in_use[MAX_POINTS] = { 0 }; static uint8_t sp_point_buffer[MAX_POINTS][SP_POINT_SIZE]; #ifdef FREESCALE_USE_LTC