modify the link.ld file and board/SConscript
This commit is contained in:
parent
6dbfac0c9f
commit
7f2abb615f
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2019, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2018-11-06 SummerGift first version
|
* 2020-06-27 AHTYDHD the first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
|
@ -27,6 +27,7 @@ elif rtconfig.CROSS_TOOL == 'iar':
|
||||||
|
|
||||||
CPPDEFINES = ['PART_TM4C123GH6PM']
|
CPPDEFINES = ['PART_TM4C123GH6PM']
|
||||||
CPPDEFINES += ['TARGET_IS_TM4C123_RB1']
|
CPPDEFINES += ['TARGET_IS_TM4C123_RB1']
|
||||||
CPPDEFINES += ['rvmdk']
|
if rtconfig.CROSS_TOOL == 'keil':
|
||||||
|
CPPDEFINES += ['rvmdk']
|
||||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
||||||
Return('group')
|
Return('group')
|
||||||
|
|
|
@ -15,36 +15,36 @@
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
||||||
#define TM4C123_SRAM1_START (0x20000000)
|
#define TM4C123_SRAM1_START (0x20000000)
|
||||||
#define TM4C123_SRAM1_END (TM4C123_SRAM1_START + 32 * 1024) // end address = 0x20000000(base adddress) + 32K(RAM size)
|
#define TM4C123_SRAM1_END (TM4C123_SRAM1_START + 32 * 1024) // end address = 0x20000000(base adddress) + 32K(RAM size)
|
||||||
|
|
||||||
#if defined(__CC_ARM) || defined(__CLANG_ARM)
|
#if defined(__CC_ARM) || defined(__CLANG_ARM)
|
||||||
extern int Image$$RW_IRAM$$ZI$$Limit; // RW_IRAM
|
extern int Image$$RW_IRAM$$ZI$$Limit; // RW_IRAM
|
||||||
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit)
|
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit)
|
||||||
#elif __ICCARM__
|
#elif __ICCARM__
|
||||||
#pragma section="HEAP"
|
#pragma section="HEAP"
|
||||||
#define HEAP_BEGIN (__segment_end("HEAP"))
|
#define HEAP_BEGIN (__segment_end("HEAP"))
|
||||||
#else
|
#else
|
||||||
extern int _ebss;
|
extern int _ebss;
|
||||||
#define HEAP_BEGIN ((void *)&_ebss)
|
#define HEAP_BEGIN ((void *)&_ebss)
|
||||||
#endif
|
#endif
|
||||||
#define HEAP_END TM4C123_SRAM1_END
|
#define HEAP_END TM4C123_SRAM1_END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_PIN
|
#ifdef RT_USING_PIN
|
||||||
#include "drv_gpio.h"
|
#include "drv_gpio.h"
|
||||||
#endif /* RT_USING_PIN */
|
#endif /* RT_USING_PIN */
|
||||||
|
|
||||||
#ifdef RT_USING_SERIAL
|
#ifdef RT_USING_SERIAL
|
||||||
#include "drv_uart.h"
|
#include "drv_uart.h"
|
||||||
#endif /* RT_USING_SERIAL */
|
#endif /* RT_USING_SERIAL */
|
||||||
|
|
||||||
#ifdef RT_USING_PWM
|
#ifdef RT_USING_PWM
|
||||||
#include "drv_pwm.h"
|
#include "drv_pwm.h"
|
||||||
#endif /* RT_USING_PWM*/
|
#endif /* RT_USING_PWM*/
|
||||||
|
|
||||||
#ifdef RT_USING_SPI
|
#ifdef RT_USING_SPI
|
||||||
#include "drv_spi.h"
|
#include "drv_spi.h"
|
||||||
#endif /* RT_USING_SPI*/
|
#endif /* RT_USING_SPI*/
|
||||||
|
|
||||||
#endif /*__BOARD_H__*/
|
#endif /*__BOARD_H__*/
|
||||||
|
|
|
@ -39,7 +39,7 @@ SECTIONS
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} > FLASH
|
} > FLASH
|
||||||
|
|
||||||
.data : AT(ADDR(.text) + SIZEOF(.text))
|
.data : AT(ADDR(.iplt) )
|
||||||
{
|
{
|
||||||
_data = .;
|
_data = .;
|
||||||
_ldata = LOADADDR (.data);
|
_ldata = LOADADDR (.data);
|
||||||
|
|
|
@ -18,16 +18,16 @@
|
||||||
#include "tm4c123_config.h"
|
#include "tm4c123_config.h"
|
||||||
|
|
||||||
#ifdef RT_USING_SERIAL
|
#ifdef RT_USING_SERIAL
|
||||||
#include "driverlib/uart.h"
|
#include "driverlib/uart.h"
|
||||||
#endif /* RT_USING_SERIAL */
|
#endif /* RT_USING_SERIAL */
|
||||||
#ifdef RT_USING_ADC
|
#ifdef RT_USING_ADC
|
||||||
#include "driverlib/adc.h"
|
#include "driverlib/adc.h"
|
||||||
#endif /* RT_USING_ADC */
|
#endif /* RT_USING_ADC */
|
||||||
#ifdef RT_USING_PWM
|
#ifdef RT_USING_PWM
|
||||||
#include "driverlib/pwm.h"
|
#include "driverlib/pwm.h"
|
||||||
#endif /* RT_USING_PWM */
|
#endif /* RT_USING_PWM */
|
||||||
#ifdef RT_USING_SPI
|
#ifdef RT_USING_SPI
|
||||||
#include "driverlib/ssi.h"
|
#include "driverlib/ssi.h"
|
||||||
#endif /* RT_USING_SPI */
|
#endif /* RT_USING_SPI */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#ifndef _DRV_ADC_H_
|
|
||||||
#define _DRV_ADC_H_
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2019, RT-Thread Development Team
|
* Copyright (c) 2006-2019, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
|
@ -11,6 +8,9 @@
|
||||||
* 2020-06-27 AHTYDHD the first version
|
* 2020-06-27 AHTYDHD the first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __DRV_ADC_H__
|
||||||
|
#define __DRV_ADC_H__
|
||||||
|
|
||||||
#include<stdint.h>
|
#include<stdint.h>
|
||||||
#include<rtthread.h>
|
#include<rtthread.h>
|
||||||
#include<rtdevice.h>
|
#include<rtdevice.h>
|
||||||
|
@ -26,6 +26,6 @@ struct tm4c123_adc_config
|
||||||
uint32_t sequencepriority;
|
uint32_t sequencepriority;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*_DRV_ADC_H_*/
|
#endif /*__DRV_ADC_H__*/
|
||||||
|
|
||||||
/************************** end of file ******************/
|
/************************** end of file ******************/
|
|
@ -8,8 +8,8 @@
|
||||||
* 2020-06-27 AHTYDHD the first version
|
* 2020-06-27 AHTYDHD the first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DRV_GPIO_H_
|
#ifndef __DRV_GPIO_H__
|
||||||
#define _DRV_GPIO_H_
|
#define __DRV_GPIO_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
@ -34,6 +34,6 @@ struct pin_index
|
||||||
|
|
||||||
extern int rt_hw_pin_init(void);
|
extern int rt_hw_pin_init(void);
|
||||||
|
|
||||||
#endif /*_DRV_GPIO_H_*/
|
#endif /*__DRV_GPIO_H__*/
|
||||||
|
|
||||||
/************************** end of file ******************/
|
/************************** end of file ******************/
|
|
@ -23,8 +23,7 @@ struct tm4c123_uart_config
|
||||||
uint32_t uartbase;
|
uint32_t uartbase;
|
||||||
uint32_t baudrate;
|
uint32_t baudrate;
|
||||||
uint32_t mode;
|
uint32_t mode;
|
||||||
//struct dma_config *dma_rx;
|
|
||||||
//struct dma_config *dma_tx;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tm4c123 uart dirver class */
|
/* tm4c123 uart dirver class */
|
||||||
|
|
Loading…
Reference in New Issue