Skip to content

Commit d306798

Browse files
committed
rtl8195am - fix ci-test issues with ARM compiler
Fix ci-test issues with ARM compiler - 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 04f0f2b commit d306798

File tree

9 files changed

+25
-7
lines changed

9 files changed

+25
-7
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/analogin_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#if CONFIG_ADC_EN
2525
#include "pinmap.h"
2626

27+
#ifdef CONFIG_MBED_ENABLED
28+
#include "platform_stdlib.h"
29+
#endif
2730

2831
extern u32 ConfigDebugErr;
2932
extern u32 ConfigDebuginfo;

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
@@ -19,6 +19,10 @@
1919

2020
#include <string.h>
2121

22+
#ifdef CONFIG_MBED_ENABLED
23+
#include "platform_stdlib.h"
24+
#endif
25+
2226
const u32 log_uart_support_rate[] = {
2327
UART_BAUD_RATE_2400, UART_BAUD_RATE_4800, UART_BAUD_RATE_9600,
2428
UART_BAUD_RATE_19200, UART_BAUD_RATE_38400, UART_BAUD_RATE_57600,

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/pwmout_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222

2323
#ifdef CONFIG_PWM_EN
2424
#include "pwmout_api.h"
25+
26+
#ifdef CONFIG_MBED_ENABLED
27+
#include "platform_stdlib.h"
28+
#endif
2529

2630
static const PinMap PinMap_PWM[] = {
2731
{PB_4, RTL_PIN_PERI(PWM0, 0, S0), RTL_PIN_FUNC(PWM0, S0)},

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/serial_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ static HAL_GDMA_OP UartGdmaOp;
6868

6969
#ifdef CONFIG_MBED_ENABLED
7070
#include "log_uart_api.h"
71+
#include "platform_stdlib.h"
72+
7173
int stdio_uart_inited = 0;
7274
serial_t stdio_uart;
7375
log_uart_t stdio_uart_log;

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
#ifdef DEVICE_TRNG
2121

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

2326
void trng_init(trng_t *obj)
2427
{

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)