Skip to content

Commit

Permalink
Restyled by gn
Browse files Browse the repository at this point in the history
Signed-off-by: Doru Gucea <[email protected]>
  • Loading branch information
restyled-commits authored and doru91 committed Jun 7, 2021
1 parent 8f5f6aa commit 1c5a39c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions examples/platform/k32w/app/ldscripts/chip-k32w061-linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
*/
BOOT_RESUME_STACK_SIZE = 1024;

/* Set Stack size to 4K minus 32Bytes reserved for ROM code at end of BANK7 so
the stack fits in BANK7. In practice the active stack size at the time of
going to sleep is more important than the total available stack size */
STACK_SIZE = (4096 - 32);
STACK_SIZE = (4096);

MEM_RAM0_BASE = 0x4000400;
MEM_RAM0_SIZE = 0x0015c00;

MEM_RAM1_BASE = 0x4020000;
MEM_RAM1_SIZE = 0x10000;

MEMORY
{
/* Define each memory region. RAM0 definition leaves the first 1kB for the
Expand All @@ -57,9 +57,9 @@ MEMORY
}

/* Define a symbol for the top of each memory region */
__top_RAM0 = MEM_RAM0_BASE + MEM_RAM0_SIZE; /* 87K bytes */
__top_RAM1 = MEM_RAM1_BASE + MEM_RAM1_SIZE; /* 64K bytes */

/* To be improved. At this moment the second RAM bank is dedicated entirely to heap. */
/* To be improved. At this moment the second RAM bank is dedicated entirely to heap + stack. */
HEAP_SIZE = DEFINED(HEAP_SIZE) ? HEAP_SIZE : 0xF000;

/* set external flash properties - external flash is present on the DK6 board */
Expand Down Expand Up @@ -311,7 +311,7 @@ SECTIONS
__nv_storage_end_address = NV_STORAGE_END_ADDRESS;
__nv_storage_start_address = NV_STORAGE_START_ADDRESS;

PROVIDE(_vStackTop = __top_RAM0 - 32);
PROVIDE(_vStackTop = __top_RAM1);
PROVIDE(__mac_buffer_base = (__mac_buffer_start & 0xfffe0000));
PROVIDE(BOOT_GetStartPowerMode = 0x03000e9d);
PROVIDE(ROM_GetFlash = 0x03000e0d);
Expand All @@ -320,6 +320,5 @@ SECTIONS
PROVIDE(Chip_LOWPOWER_ChipSoftwareReset = 0x03003fa1);

__StackLimit = _vStackTop - STACK_SIZE;
/* ASSERT(__StackLimit >= _end_boot_resume_stack, "Possible stack corruption with data/bss/boot_stack") */
ASSERT(_etext < NV_STORAGE_START_ADDRESS, "Application does not fit into flash!")
ASSERT (LENGTH(Flash640) >= (_etext + SIZEOF(.data)), "Application does not fit into flash!")
}
2 changes: 1 addition & 1 deletion third_party/k32w_sdk/k32w_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ template("k32w_sdk") {
"${k32w_sdk_root}/middleware/wireless/bluetooth/application/common/ble_host_tasks.c",
"${k32w_sdk_root}/middleware/wireless/bluetooth/host/config/ble_globals.c",
"${k32w_sdk_root}/middleware/wireless/framework/Common/MicroInt_arm_sdk2.c",
"${k32w_sdk_root}/middleware/wireless/framework/Flash/Internal/Flash_Adapter.c",
"${k32w_sdk_root}/middleware/wireless/framework/Flash/External/Source/Eeprom_MX25R8035F.c",
"${k32w_sdk_root}/middleware/wireless/framework/Flash/Internal/Flash_Adapter.c",
"${k32w_sdk_root}/middleware/wireless/framework/FunctionLib/FunctionLib.c",
"${k32w_sdk_root}/middleware/wireless/framework/GPIO/GPIO_Adapter.c",
"${k32w_sdk_root}/middleware/wireless/framework/Keyboard/Source/Keyboard.c",
Expand Down

0 comments on commit 1c5a39c

Please sign in to comment.