modify the link.ld file and board/SConscript

This commit is contained in:
LYH-ux 2020-07-02 13:01:57 +08:00
parent 6dbfac0c9f
commit 7f2abb615f
8 changed files with 34 additions and 34 deletions

View File

@ -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
*
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2020-06-27 AHTYDHD the first version
*/
#include <rtthread.h>

View File

@ -27,6 +27,7 @@ elif rtconfig.CROSS_TOOL == 'iar':
CPPDEFINES = ['PART_TM4C123GH6PM']
CPPDEFINES += ['TARGET_IS_TM4C123_RB1']
CPPDEFINES += ['rvmdk']
if rtconfig.CROSS_TOOL == 'keil':
CPPDEFINES += ['rvmdk']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')

View File

@ -15,36 +15,36 @@
#include <rtthread.h>
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
#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_START (0x20000000)
#define TM4C123_SRAM1_END (TM4C123_SRAM1_START + 32 * 1024) // end address = 0x20000000(base adddress) + 32K(RAM size)
#if defined(__CC_ARM) || defined(__CLANG_ARM)
extern int Image$$RW_IRAM$$ZI$$Limit; // RW_IRAM
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit)
#elif __ICCARM__
#pragma section="HEAP"
#define HEAP_BEGIN (__segment_end("HEAP"))
#else
extern int _ebss;
#define HEAP_BEGIN ((void *)&_ebss)
#endif
#define HEAP_END TM4C123_SRAM1_END
#if defined(__CC_ARM) || defined(__CLANG_ARM)
extern int Image$$RW_IRAM$$ZI$$Limit; // RW_IRAM
#define HEAP_BEGIN ((void *)&Image$$RW_IRAM$$ZI$$Limit)
#elif __ICCARM__
#pragma section="HEAP"
#define HEAP_BEGIN (__segment_end("HEAP"))
#else
extern int _ebss;
#define HEAP_BEGIN ((void *)&_ebss)
#endif
#define HEAP_END TM4C123_SRAM1_END
#endif
#ifdef RT_USING_PIN
#include "drv_gpio.h"
#include "drv_gpio.h"
#endif /* RT_USING_PIN */
#ifdef RT_USING_SERIAL
#include "drv_uart.h"
#include "drv_uart.h"
#endif /* RT_USING_SERIAL */
#ifdef RT_USING_PWM
#include "drv_pwm.h"
#include "drv_pwm.h"
#endif /* RT_USING_PWM*/
#ifdef RT_USING_SPI
#include "drv_spi.h"
#include "drv_spi.h"
#endif /* RT_USING_SPI*/
#endif /*__BOARD_H__*/

View File

@ -39,7 +39,7 @@ SECTIONS
_etext = .;
} > FLASH
.data : AT(ADDR(.text) + SIZEOF(.text))
.data : AT(ADDR(.iplt) )
{
_data = .;
_ldata = LOADADDR (.data);

View File

@ -18,16 +18,16 @@
#include "tm4c123_config.h"
#ifdef RT_USING_SERIAL
#include "driverlib/uart.h"
#include "driverlib/uart.h"
#endif /* RT_USING_SERIAL */
#ifdef RT_USING_ADC
#include "driverlib/adc.h"
#include "driverlib/adc.h"
#endif /* RT_USING_ADC */
#ifdef RT_USING_PWM
#include "driverlib/pwm.h"
#include "driverlib/pwm.h"
#endif /* RT_USING_PWM */
#ifdef RT_USING_SPI
#include "driverlib/ssi.h"
#include "driverlib/ssi.h"
#endif /* RT_USING_SPI */

View File

@ -1,6 +1,3 @@
#ifndef _DRV_ADC_H_
#define _DRV_ADC_H_
/*
* Copyright (c) 2006-2019, RT-Thread Development Team
*
@ -11,6 +8,9 @@
* 2020-06-27 AHTYDHD the first version
*/
#ifndef __DRV_ADC_H__
#define __DRV_ADC_H__
#include<stdint.h>
#include<rtthread.h>
#include<rtdevice.h>
@ -26,6 +26,6 @@ struct tm4c123_adc_config
uint32_t sequencepriority;
};
#endif /*_DRV_ADC_H_*/
#endif /*__DRV_ADC_H__*/
/************************** end of file ******************/

View File

@ -8,8 +8,8 @@
* 2020-06-27 AHTYDHD the first version
*/
#ifndef _DRV_GPIO_H_
#define _DRV_GPIO_H_
#ifndef __DRV_GPIO_H__
#define __DRV_GPIO_H__
#include <stdint.h>
#include <rtthread.h>
@ -34,6 +34,6 @@ struct pin_index
extern int rt_hw_pin_init(void);
#endif /*_DRV_GPIO_H_*/
#endif /*__DRV_GPIO_H__*/
/************************** end of file ******************/

View File

@ -23,8 +23,7 @@ struct tm4c123_uart_config
uint32_t uartbase;
uint32_t baudrate;
uint32_t mode;
//struct dma_config *dma_rx;
//struct dma_config *dma_tx;
};
/* tm4c123 uart dirver class */