Skip to content

Commit 7f2abb6

Browse files
committed
modify the link.ld file and board/SConscript
1 parent 6dbfac0 commit 7f2abb6

File tree

8 files changed

+35
-35
lines changed

8 files changed

+35
-35
lines changed

bsp/tm4c123bsp/applications/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (c) 2006-2018, RT-Thread Development Team
2+
* Copyright (c) 2006-2019, RT-Thread Development Team
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
66
* Change Logs:
77
* Date Author Notes
8-
* 2018-11-06 SummerGift first version
8+
* 2020-06-27 AHTYDHD the first version
99
*/
1010

1111
#include <rtthread.h>

bsp/tm4c123bsp/board/SConscript

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ elif rtconfig.CROSS_TOOL == 'iar':
2727

2828
CPPDEFINES = ['PART_TM4C123GH6PM']
2929
CPPDEFINES += ['TARGET_IS_TM4C123_RB1']
30-
CPPDEFINES += ['rvmdk']
30+
if rtconfig.CROSS_TOOL == 'keil':
31+
CPPDEFINES += ['rvmdk']
3132
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
3233
Return('group')

bsp/tm4c123bsp/board/board.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,36 @@
1515
#include <rtthread.h>
1616

1717
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
18-
#define TM4C123_SRAM1_START (0x20000000)
19-
#define TM4C123_SRAM1_END (TM4C123_SRAM1_START + 32 * 1024) // end address = 0x20000000(base adddress) + 32K(RAM size)
20-
21-
#if defined(__CC_ARM) || defined(__CLANG_ARM)
22-
extern int Image$$RW_IRAM$$ZI$$Limit; // RW_IRAM
23-
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit)
24-
#elif __ICCARM__
25-
#pragma section="HEAP"
26-
#define HEAP_BEGIN (__segment_end("HEAP"))
27-
#else
28-
extern int _ebss;
29-
#define HEAP_BEGIN ((void *)&_ebss)
30-
#endif
31-
#define HEAP_END TM4C123_SRAM1_END
18+
#define TM4C123_SRAM1_START (0x20000000)
19+
#define TM4C123_SRAM1_END (TM4C123_SRAM1_START + 32 * 1024) // end address = 0x20000000(base adddress) + 32K(RAM size)
20+
21+
#if defined(__CC_ARM) || defined(__CLANG_ARM)
22+
extern int Image$$RW_IRAM$$ZI$$Limit; // RW_IRAM
23+
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit)
24+
#elif __ICCARM__
25+
#pragma section="HEAP"
26+
#define HEAP_BEGIN (__segment_end("HEAP"))
27+
#else
28+
extern int _ebss;
29+
#define HEAP_BEGIN ((void *)&_ebss)
30+
#endif
31+
#define HEAP_END TM4C123_SRAM1_END
3232
#endif
3333

3434
#ifdef RT_USING_PIN
35-
#include "drv_gpio.h"
35+
#include "drv_gpio.h"
3636
#endif /* RT_USING_PIN */
3737

3838
#ifdef RT_USING_SERIAL
39-
#include "drv_uart.h"
39+
#include "drv_uart.h"
4040
#endif /* RT_USING_SERIAL */
4141

4242
#ifdef RT_USING_PWM
43-
#include "drv_pwm.h"
43+
#include "drv_pwm.h"
4444
#endif /* RT_USING_PWM*/
4545

4646
#ifdef RT_USING_SPI
47-
#include "drv_spi.h"
47+
#include "drv_spi.h"
4848
#endif /* RT_USING_SPI*/
4949

5050
#endif /*__BOARD_H__*/

bsp/tm4c123bsp/board/linker_scripts/link.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SECTIONS
3939
_etext = .;
4040
} > FLASH
4141

42-
.data : AT(ADDR(.text) + SIZEOF(.text))
42+
.data : AT(ADDR(.iplt) )
4343
{
4444
_data = .;
4545
_ldata = LOADADDR (.data);

bsp/tm4c123bsp/board/tm4c123_config.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
#include "tm4c123_config.h"
1919

2020
#ifdef RT_USING_SERIAL
21-
#include "driverlib/uart.h"
21+
#include "driverlib/uart.h"
2222
#endif /* RT_USING_SERIAL */
2323
#ifdef RT_USING_ADC
24-
#include "driverlib/adc.h"
24+
#include "driverlib/adc.h"
2525
#endif /* RT_USING_ADC */
2626
#ifdef RT_USING_PWM
27-
#include "driverlib/pwm.h"
27+
#include "driverlib/pwm.h"
2828
#endif /* RT_USING_PWM */
2929
#ifdef RT_USING_SPI
30-
#include "driverlib/ssi.h"
30+
#include "driverlib/ssi.h"
3131
#endif /* RT_USING_SPI */
3232

3333

bsp/tm4c123bsp/libraries/Drivers/drv_adc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#ifndef _DRV_ADC_H_
2-
#define _DRV_ADC_H_
3-
41
/*
52
* Copyright (c) 2006-2019, RT-Thread Development Team
63
*
@@ -11,6 +8,9 @@
118
* 2020-06-27 AHTYDHD the first version
129
*/
1310

11+
#ifndef __DRV_ADC_H__
12+
#define __DRV_ADC_H__
13+
1414
#include<stdint.h>
1515
#include<rtthread.h>
1616
#include<rtdevice.h>
@@ -26,6 +26,6 @@ struct tm4c123_adc_config
2626
uint32_t sequencepriority;
2727
};
2828

29-
#endif /*_DRV_ADC_H_*/
29+
#endif /*__DRV_ADC_H__*/
3030

3131
/************************** end of file ******************/

bsp/tm4c123bsp/libraries/Drivers/drv_gpio.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* 2020-06-27 AHTYDHD the first version
99
*/
1010

11-
#ifndef _DRV_GPIO_H_
12-
#define _DRV_GPIO_H_
11+
#ifndef __DRV_GPIO_H__
12+
#define __DRV_GPIO_H__
1313

1414
#include <stdint.h>
1515
#include <rtthread.h>
@@ -34,6 +34,6 @@ struct pin_index
3434

3535
extern int rt_hw_pin_init(void);
3636

37-
#endif /*_DRV_GPIO_H_*/
37+
#endif /*__DRV_GPIO_H__*/
3838

3939
/************************** end of file ******************/

bsp/tm4c123bsp/libraries/Drivers/drv_uart.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ struct tm4c123_uart_config
2323
uint32_t uartbase;
2424
uint32_t baudrate;
2525
uint32_t mode;
26-
//struct dma_config *dma_rx;
27-
//struct dma_config *dma_tx;
26+
2827
};
2928

3029
/* tm4c123 uart dirver class */

0 commit comments

Comments
 (0)