[rt-smart][art-pi] update imx6ull-smart bsp

This commit is contained in:
liYony 2024-03-20 21:46:32 +08:00 committed by Meco Man
parent 8c710ad04f
commit ac38532aeb
4 changed files with 28 additions and 17 deletions

View File

@ -995,6 +995,7 @@ CONFIG_RT_USING_LDSO=y
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set
#
# miscellaneous packages

View File

@ -104,14 +104,19 @@ void assert_handler(const char *ex_string, const char *func, rt_size_t line)
void rt_hw_board_init(void)
{
#ifdef RT_USING_SMART
rt_uint32_t mmutable_p = 0;
rt_hw_mmu_map_init(&rt_kernel_space, (void*)0xf0000000, 0x10000000, MMUTable, PV_OFFSET);
rt_hw_init_mmu_table(platform_mem_desc, platform_mem_desc_size);
mmutable_p = (rt_uint32_t)MMUTable + (rt_uint32_t)PV_OFFSET ;
rt_hw_mmu_switch((void*)mmutable_p);
rt_page_init(init_page_region);
rt_hw_mmu_ioremap_init(&rt_kernel_space, (void*)0xf0000000, 0x10000000);
arch_kuser_init(&rt_kernel_space, (void*)0xffff0000);
#else
rt_hw_mmu_map_init(&rt_kernel_space, (void*)0x80000000, 0x10000000, MMUTable, 0);
rt_hw_init_mmu_table(platform_mem_desc,platform_mem_desc_size);
rt_hw_mmu_init();
rt_hw_mmu_ioremap_init(&rt_kernel_space, (void*)0x80000000, 0x10000000);
#endif

View File

@ -52,7 +52,7 @@
/* Endian mode. */
#define USDHC_ENDIAN_MODE kUSDHC_EndianModeLittle
uint32_t g_usdhcAdma2Table[USDHC_ADMA_TABLE_WORDS];
static uint32_t g_usdhcAdma2Table[USDHC_ADMA_TABLE_WORDS];
struct rt_mmcsd_host *host1;
struct rt_mmcsd_host *host2;
static rt_mutex_t mmcsd_mutex = RT_NULL;

View File

@ -5,12 +5,13 @@ ARCH ='arm'
CPU ='cortex-a'
CROSS_TOOL = 'gcc'
PLATFORM = 'gcc'
EXEC_PATH = os.getenv('RTT_EXEC_PATH') or '/usr/bin'
EXEC_PATH = os.getenv('RTT_EXEC_PATH') or r'/usr/bin'
BUILD = 'debug'
LINK_SCRIPT = 'link.lds'
if PLATFORM == 'gcc':
# toolchains
PREFIX = os.getenv('RTT_CC_PREFIX') or 'arm-linux-musleabi-'
PREFIX = os.getenv('RTT_CC_PREFIX') or 'arm-none-eabi-'
CC = PREFIX + 'gcc'
CXX = PREFIX + 'g++'
AS = PREFIX + 'gcc'
@ -22,26 +23,30 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy'
STRIP = PREFIX + 'strip'
CFPFLAGS = ' -msoft-float'
AFPFLAGS = ' -mfloat-abi=softfp -mfpu=vfpv3-d16'
DEVICE = ' -march=armv7-a -mtune=cortex-a7 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing -fcommon'
AFPFLAGS = ' -mfloat-abi=softfp -mfpu=neon'
DEVICE = ' -march=armv7-a -mtune=cortex-a7 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall'
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -std=gnu99'
AFLAGS = DEVICE + ' -c' + AFPFLAGS + ' -x assembler-with-cpp -D__ASSEMBLY__'
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T link.lds' + ' -lgcc'
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always'
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -D_POSIX_SOURCE -fdiagnostics-color=always'
AFLAGS = DEVICE + ' -c' + AFPFLAGS + ' -x assembler-with-cpp'
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T '+ LINK_SCRIPT + ' -lsupc++ -lgcc -static'
CPATH = ''
LPATH = ''
if BUILD == 'debug':
CFLAGS += ' -O0 -gdwarf-2' + ' -Wno-unused-function'
CFLAGS += ' -O0 -gdwarf-2'
CXXFLAGS += ' -O0 -gdwarf-2'
AFLAGS += ' -gdwarf-2'
else:
CFLAGS += ' -Os'
CXXFLAGS += ' -Os'
CXXFLAGS += ' -Woverloaded-virtual -fno-exceptions -fno-rtti'
MKIMAGE = '-t imximage -b rtthread.bin -o rtthread.imx -g rtthread.img -a 0x80001000'
CXXFLAGS += ' -Woverloaded-virtual -fno-rtti'
DUMP_ACTION = OBJDUMP + ' -D -S $TARGET > rtt.asm\n'
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' +\
'python3 mkimage.py ' + MKIMAGE + '\n'
M_CFLAGS = CFLAGS + ' -mlong-calls -fPIC '
M_CXXFLAGS = CXXFLAGS + ' -mlong-calls -fPIC'
M_LFLAGS = DEVICE + CXXFLAGS + ' -Wl,--gc-sections,-z,max-page-size=0x4' +\
' -shared -fPIC -nostartfiles -nostdlib -static-libgcc'
M_POST_ACTION = STRIP + ' -R .hash $TARGET\n' + SIZE + ' $TARGET \n'
DUMP_ACTION = OBJDUMP + ' -D -S $TARGET > rtt.asm\n'
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'