mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
This is an upgrade to the latest FX3 SDK (1.3.5) and to the ARM gcc in version 15.3.rel1 for the build of the B2xx firmware and bootloader. All required steps are explained in the updated readme file. Additionally, some bounds checks were added both in the firmware and the bootloader, as well as some more validations and checks to prevent over- and underflows. Newly introduced checks were documented in the code.
84 lines
2.9 KiB
Diff
84 lines
2.9 KiB
Diff
diff -r -u cyfx3sdk/fw_build/boot_fw/cyfx3.ld cyfx3sdk-modified/fw_build/boot_fw/cyfx3.ld
|
|
--- cyfx3sdk/fw_build/boot_fw/cyfx3.ld 2026-08-11 15:34:04.645797167 +0200
|
|
+++ cyfx3sdk-modified/fw_build/boot_fw/cyfx3.ld 2026-08-11 15:51:14.427111162 +0200
|
|
@@ -41,12 +41,18 @@
|
|
MEMORY
|
|
{
|
|
I-TCM : ORIGIN = 0x100 LENGTH = 0x100
|
|
+ BLANK : ORIGIN = 0x40070000 LENGTH = 0x0100
|
|
SYS_MEM : ORIGIN = 0x40078000 LENGTH = 0x7000
|
|
DATA : ORIGIN = 0x4007F000 LENGTH = 0x1000
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
+ .blank :
|
|
+ {
|
|
+ . += 0x100;
|
|
+ } > BLANK
|
|
+
|
|
.vectors :
|
|
{
|
|
*(CYU3P_ITCM_SECTION)
|
|
diff -r -u cyfx3sdk/fw_build/fx3_fw/cyfxtx.c cyfx3sdk-modified/fw_build/fx3_fw/cyfxtx.c
|
|
--- cyfx3sdk/fw_build/fx3_fw/cyfxtx.c 2026-08-11 15:34:04.685797262 +0200
|
|
+++ cyfx3sdk-modified/fw_build/fx3_fw/cyfxtx.c 2026-08-11 15:34:17.397827996 +0200
|
|
@@ -98,7 +98,7 @@
|
|
area which is used by the application code as well as the drivers to allocate thread
|
|
stacks and other internal data structures.
|
|
*/
|
|
-#define CY_U3P_MEM_HEAP_BASE (0x40038000)
|
|
+#define CY_U3P_MEM_HEAP_BASE (0x40044000)
|
|
#define CY_U3P_MEM_HEAP_SIZE (0x8000)
|
|
|
|
/*
|
|
diff -r -u cyfx3sdk/fw_build/fx3_fw/fx3_512k.ld cyfx3sdk-modified/fw_build/fx3_fw/fx3_512k.ld
|
|
--- cyfx3sdk/fw_build/fx3_fw/fx3_512k.ld 2026-08-11 15:34:04.665797215 +0200
|
|
+++ cyfx3sdk-modified/fw_build/fx3_fw/fx3_512k.ld 2026-08-11 15:34:17.381827956 +0200
|
|
@@ -32,11 +32,11 @@
|
|
The default memory map used for FX3 applications is as follows:
|
|
|
|
Descriptor area Base: 0x40000000 Size: 12KB
|
|
- Code area Base: 0x40003000 Size: 180KB
|
|
- Data area Base: 0x40030000 Size: 32KB
|
|
- Driver heap Base: 0x40038000 Size: 32KB (Update cyfxtx.c to change this.)
|
|
- Buffer area Base: 0x40040000 Size: 224KB (Update cyfxtx.c to change this.)
|
|
- 2-stage boot area Base: 0x40078000 Size: 32KB (Update cyfxtx.c to change this.)
|
|
+ Code area Base: 0x40003000 Size: 212KB
|
|
+ Data area Base: 0x40038000 Size: 32KB
|
|
+ Heap Base: 0x40040000 Size: 16KB
|
|
+ Driver heap Base: 0x40044000 Size: 32KB (Update cyfxtx.c to change this.)
|
|
+ Buffer area Base: 0x4004C000 Size: 208KB (Update cyfxtx.c to change this.)
|
|
|
|
Interrupt handlers are placed in I-TCM (16KB). The first 256 bytes of ITCM are
|
|
reserved for Exception Vectors and will be loaded during firmware initialization.
|
|
@@ -59,8 +59,8 @@
|
|
MEMORY
|
|
{
|
|
I-TCM : ORIGIN = 0x200 LENGTH = 0x3E00
|
|
- SYS_MEM : ORIGIN = 0x40003000 LENGTH = 0x2D000
|
|
- DATA : ORIGIN = 0x40030000 LENGTH = 0x8000
|
|
+ SYS_MEM : ORIGIN = 0x40003000 LENGTH = 0x35000
|
|
+ DATA : ORIGIN = 0x40038000 LENGTH = 0x8000
|
|
}
|
|
|
|
SECTIONS
|
|
@@ -115,5 +115,17 @@
|
|
. = ALIGN(4);
|
|
} > DATA
|
|
__exidx_end = .;
|
|
+
|
|
+ PROVIDE(__exidx_end = __exidx_end);
|
|
+
|
|
+ . = ALIGN(4);
|
|
+ __heap_start = 0x40040000;
|
|
+ PROVIDE(__heap_start = __heap_start);
|
|
+
|
|
+ . = ALIGN(4);
|
|
+ __heap_end = 0x40044000;
|
|
+ PROVIDE(__heap_end = __heap_end);
|
|
+
|
|
+ PROVIDE(__heap_size = __heap_end - __heap_start);
|
|
}
|
|
|