mirror of
https://github.com/drasko/codezero.git
synced 2026-10-14 14:47:01 +02:00
Move the linker scripts out of the header file directory.
This commit is contained in:
@@ -43,13 +43,13 @@ environment['targetHelpEntries']['tasklibs'] = 'build the support libraries for
|
|||||||
|
|
||||||
def buildTask(programName, sources, environment, previousImage, extraCppPath=None):
|
def buildTask(programName, sources, environment, previousImage, extraCppPath=None):
|
||||||
e = environment.Clone()
|
e = environment.Clone()
|
||||||
e.Append(LINKFLAGS=['-T' + e['posixServicesDirectory'] + '/' + programName + '/include/linker.lds'])
|
e.Append(LINKFLAGS=['-T' + e['posixServicesDirectory'] + '/' + programName + '/linker.lds'])
|
||||||
e.Append(LIBPATH=['#' + e['buildDirectory'] + '/' + e['posixServicesDirectory'] + '/' + programName])
|
e.Append(LIBPATH=['#' + e['buildDirectory'] + '/' + e['posixServicesDirectory'] + '/' + programName])
|
||||||
if extraCppPath: e.Append(CPPPATH=extraCppPath)
|
if extraCppPath: e.Append(CPPPATH=extraCppPath)
|
||||||
objects = e.StaticObject(sources)
|
objects = e.StaticObject(sources)
|
||||||
Depends(objects, e['configFiles'])
|
Depends(objects, e['configFiles'])
|
||||||
program = e.Program(programName, objects)
|
program = e.Program(programName, objects)
|
||||||
environment['physicalBaseLinkerScript'] = Command('include/physical_base.lds', previousImage, 'tools/pyelf/readelf.py --first-free-page ' + previousImage[0].path + ' >> $TARGET')
|
environment['physicalBaseLinkerScript'] = Command('physical_base.lds', previousImage, 'tools/pyelf/readelf.py --first-free-page ' + previousImage[0].path + ' >> $TARGET')
|
||||||
Depends(program, [environment['physicalBaseLinkerScript']])
|
Depends(program, [environment['physicalBaseLinkerScript']])
|
||||||
return program
|
return program
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
/* USER_AREA_START, see memlayout.h */
|
/* USER_AREA_START, see memlayout.h */
|
||||||
virtual_base = 0x10000000;
|
virtual_base = 0x10000000;
|
||||||
__stack = (0x20000000 - 0x1000 - 8); /* First page before env/args page */
|
__stack = (0x20000000 - 0x1000 - 8); /* First page before env/args page */
|
||||||
INCLUDE "include/physical_base.lds"
|
INCLUDE "physical_base.lds"
|
||||||
|
|
||||||
/* physical_base = 0x228000; */
|
/* physical_base = 0x228000; */
|
||||||
offset = virtual_base - physical_base;
|
offset = virtual_base - physical_base;
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
/* INITTASK_AREA_START, see memlayout.h */
|
/* INITTASK_AREA_START, see memlayout.h */
|
||||||
virtual_base = 0xE0000000;
|
virtual_base = 0xE0000000;
|
||||||
INCLUDE "include/physical_base.lds"
|
INCLUDE "physical_base.lds"
|
||||||
|
|
||||||
/* physical_base = 0x228000; */
|
/* physical_base = 0x228000; */
|
||||||
pager_offset = virtual_base - physical_base;
|
pager_offset = virtual_base - physical_base;
|
||||||
@@ -75,7 +75,7 @@ def createTestExecS(target, source, env):
|
|||||||
|
|
||||||
testTaskEnvironment = environment.Clone()
|
testTaskEnvironment = environment.Clone()
|
||||||
testTaskEnvironment.Append(CPPPATH=['#' + testTaskEnvironment['posixServicesDirectory'] +'/libposix/include/posix'])
|
testTaskEnvironment.Append(CPPPATH=['#' + testTaskEnvironment['posixServicesDirectory'] +'/libposix/include/posix'])
|
||||||
testExecLinkerScript = Command('#build/' + testTaskEnvironment['posixServicesDirectory'] +'/' + taskName + '/include/test_exec_linker.lds', testTaskEnvironment['physicalBaseLinkerScript'], createTestExecLinkerScript)
|
testExecLinkerScript = Command('#build/' + testTaskEnvironment['posixServicesDirectory'] +'/' + taskName + '/test_exec_linker.lds', testTaskEnvironment['physicalBaseLinkerScript'], createTestExecLinkerScript)
|
||||||
testExecEnvironment = testTaskEnvironment.Clone()
|
testExecEnvironment = testTaskEnvironment.Clone()
|
||||||
testExecEnvironment.Append(LINKFLAGS=['-T' + testExecLinkerScript[0].path])
|
testExecEnvironment.Append(LINKFLAGS=['-T' + testExecLinkerScript[0].path])
|
||||||
testExec = testExecEnvironment.Program('test_exec', Glob('src/test_exec/*.[cS]'))
|
testExec = testExecEnvironment.Program('test_exec', Glob('src/test_exec/*.[cS]'))
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
/* USER_AREA_START, see memlayout.h */
|
/* USER_AREA_START, see memlayout.h */
|
||||||
virtual_base = 0x10000000;
|
virtual_base = 0x10000000;
|
||||||
__stack = (0x20000000 - 0x1000 - 8); /* First page before the env/args */
|
__stack = (0x20000000 - 0x1000 - 8); /* First page before the env/args */
|
||||||
INCLUDE "include/physical_base.lds"
|
INCLUDE "physical_base.lds"
|
||||||
|
|
||||||
/* physical_base = 0x228000; */
|
/* physical_base = 0x228000; */
|
||||||
offset = virtual_base - physical_base;
|
offset = virtual_base - physical_base;
|
||||||
Reference in New Issue
Block a user