IAR: add default `target.h` and update

pull/151/head
Elms 2021-09-28 16:12:18 -07:00 committed by Daniele Lacamera
parent bdbc551a29
commit 8c813552d7
4 changed files with 50 additions and 3 deletions

View File

@ -10,6 +10,12 @@ This example application has been configured to work on STM32F4.
wolfBoot is stored and executed at the beginning of the flash (0x08000000), while the signed
application image starts at address 0x08020000.
```
$template=Get-Content -path ..\..\include\target.h.in;
Get-Content -path ..\..\config\examples\stm32f4.config | ForEach-Object {$v=$_.Split('?='); $a=$v[0]; $b=$v[2]; $template=($template -replace "##$a##",$b) };
$template=($template -replace "##.*##","");
Set-Content -path target.h $template
```
## Workspace

42
IDE/IAR/target.h 100644
View File

@ -0,0 +1,42 @@
/* target.h
*
* User configurable build-time options for bootloader and application offsets
*
* target.h is automatically generated using the template in target.h.in by running
* "make config".
*
* Copyright (C) 2021 wolfSSL Inc.
*
* This file is part of wolfBoot.
*
* wolfBoot is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef H_TARGETS_TARGET_
#define H_TARGETS_TARGET_
#define WOLFBOOT_SECTOR_SIZE 0x20000
#define WOLFBOOT_PARTITION_BOOT_ADDRESS 0x20000
#define WOLFBOOT_PARTITION_SIZE 0x20000
#define WOLFBOOT_PARTITION_UPDATE_ADDRESS 0x40000
#define WOLFBOOT_PARTITION_SWAP_ADDRESS 0x60000
/* Load address in RAM for staged OS (update_ram only) */
#define WOLFBOOT_DTS_BOOT_ADDRESS
#define WOLFBOOT_DTS_UPDATE_ADDRESS
#define WOLFBOOT_LOAD_ADDRESS
#define WOLFBOOT_LOAD_DTS_ADDRESS
#endif /* !H_TARGETS_TARGET_ */

View File

@ -353,6 +353,7 @@
<option>
<name>CCIncludePath2</name>
<state>$PROJ_DIR$\..\..\include</state>
<state>$PROJ_DIR$</state>
</option>
<option>
<name>CCStdIncCheck</name>

View File

@ -356,6 +356,7 @@
<state>$PROJ_DIR$\..\..\include</state>
<state>$PROJ_DIR$\..\..\lib\wolfssl</state>
<state>$PROJ_DIR$\..\..</state>
<state>$PROJ_DIR$</state>
</option>
<option>
<name>CCStdIncCheck</name>
@ -2213,8 +2214,5 @@
<file>
<name>$PROJ_DIR$\..\..\src\update_flash.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\src\xmalloc.c</name>
</file>
</group>
</project>