Merge pull request #1069 from BernardXiong/master

[BSP] Add qemu-nographic script
This commit is contained in:
Bernard Xiong 2017-12-02 16:36:11 +08:00 committed by GitHub
commit d629a3c87f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1 @@
qemu-system-arm -M vexpress-a9 -kernel rtthread.elf -nographic

View File

@ -37,7 +37,7 @@ if PLATFORM == 'gcc':
CFLAGS = DEVICE + ' -Wall' CFLAGS = DEVICE + ' -Wall'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__ASSEMBLY__' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__ASSEMBLY__'
LINK_SCRIPT = 'link.lds' LINK_SCRIPT = 'link.lds'
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors'+\ LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors'+\
' -T %s' % LINK_SCRIPT ' -T %s' % LINK_SCRIPT
CPATH = '' CPATH = ''

View File

@ -303,6 +303,11 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
LINKCOMSTR = 'LINK $TARGET' LINKCOMSTR = 'LINK $TARGET'
) )
# fix the linker for C++
if GetDepend('RT_USING_CPLUSPLUS'):
if env['LINK'].find('gcc') != -1:
env['LINK'] = env['LINK'].replace('gcc', 'g++')
# we need to seperate the variant_dir for BSPs and the kernels. BSPs could # we need to seperate the variant_dir for BSPs and the kernels. BSPs could
# have their own components etc. If they point to the same folder, SCons # have their own components etc. If they point to the same folder, SCons
# would find the wrong source code to compile. # would find the wrong source code to compile.