Skip to content

Commit 9d30469

Browse files
committed
mbed-os_ci-test-fixed_rtl8195am
fix section error, ARM compiler uses IRAM1.bss to calculate the heap size fix conflict of _memset between Ameba's library and ARM compiler's library, use standard memset() instead of _memset() in case of ARM compiler
1 parent 3d37d81 commit 9d30469

File tree

9 files changed

+29
-8
lines changed

9 files changed

+29
-8
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/analogin_api.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
#include "hal_adc.h"
2020
#include "analogin_api.h"
2121

22-
22+
#ifdef CONFIG_MBED_ENABLED
23+
#include "platform_stdlib.h"
24+
#endif
2325

2426
#if CONFIG_ADC_EN
2527
#include "pinmap.h"

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_ARM_STD/rtl8195a.sct

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ LR_IRAM 0x10007000 (0x70000 - 0x7000) {
2929
*libc.a (+RW)
3030
*(.sdram.data*)
3131
*lib_peripheral_mbed_arm.ar (+RW)
32-
}
33-
34-
RW_IRAM2 +0 UNINIT FIXED {
3532
*rtl8195a_crypto*.o(+ZI, COMMON)
3633
*libc.a (+ZI, COMMON)
3734
*(.bss.thread_stack_main)

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/rtl8195a_init.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
#if defined(__CC_ARM) || \
1919
(defined (__ARMCC_VERSION) && __ARMCC_VERSION >= 6010050)
2020

21-
extern uint8_t Image$$RW_IRAM2$$ZI$$Base[];
22-
extern uint8_t Image$$RW_IRAM2$$ZI$$Limit[];
21+
extern uint8_t Image$$RW_IRAM1$$ZI$$Base[];
22+
extern uint8_t Image$$RW_IRAM1$$ZI$$Limit[];
2323
extern uint8_t Image$$TCM_OVERLAY$$ZI$$Base[];
2424
extern uint8_t Image$$TCM_OVERLAY$$ZI$$Limit[];
2525
extern uint8_t Image$$RW_DRAM2$$ZI$$Base[];
2626
extern uint8_t Image$$RW_DRAM2$$ZI$$Limit[];
27-
#define __bss_sram_start__ Image$$RW_IRAM2$$ZI$$Base
28-
#define __bss_sram_end__ Image$$RW_IRAM2$$ZI$$Limit
27+
#define __bss_sram_start__ Image$$RW_IRAM1$$ZI$$Base
28+
#define __bss_sram_end__ Image$$RW_IRAM1$$ZI$$Limit
2929
#define __bss_dtcm_start__ Image$$TCM_OVERLAY$$ZI$$Base
3030
#define __bss_dtcm_end__ Image$$TCM_OVERLAY$$ZI$$Limit
3131
#define __bss_dram_start__ Image$$RW_DRAM2$$ZI$$Base

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/log_uart_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include "objects.h"
1818
#include "log_uart_api.h"
1919

20+
#ifdef CONFIG_MBED_ENABLED
21+
#include "platform_stdlib.h"
22+
#endif
23+
2024
#include <string.h>
2125

2226
const u32 log_uart_support_rate[] = {

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/pwmout_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#include "objects.h"
1919
#include "pinmap.h"
2020

21+
#ifdef CONFIG_MBED_ENABLED
22+
#include "platform_stdlib.h"
23+
#endif
24+
2125
#if DEVICE_PWMOUT
2226

2327
#ifdef CONFIG_PWM_EN

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/serial_api.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
#include "rtl8195a.h"
1818
#include "objects.h"
1919
#include "serial_api.h"
20+
21+
#ifdef CONFIG_MBED_ENABLED
22+
#include "platform_stdlib.h"
23+
#endif
24+
2025
#if CONFIG_UART_EN
2126

2227
#include "pinmap.h"

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/spi_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#include "pinmap.h"
2222
#include "hal_ssi.h"
2323

24+
#ifdef CONFIG_MBED_ENABLED
25+
#include "platform_stdlib.h"
26+
#endif
27+
2428
extern u32 SystemGetCpuClk(VOID);
2529
extern VOID HAL_GPIO_PullCtrl(u32 pin, u32 mode);
2630

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/trng_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include "analogin_api.h"
1818
#include "analogin_ext.h"
1919

20+
#ifdef CONFIG_MBED_ENABLED
21+
#include "platform_stdlib.h"
22+
#endif
23+
2024
#ifdef DEVICE_TRNG
2125

2226

targets/TARGET_Realtek/TARGET_AMEBA/sdk/common/api/platform/platform_stdlib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include <stdint.h>
5252
#include "diag.h"
5353
#define strsep(str, delim) _strsep(str, delim)
54+
#define _memset(dst, val, sz) memset(dst, val, sz)
5455
#else
5556
#include <stdio.h>
5657
#include <stdlib.h>

0 commit comments

Comments
 (0)