Ver código fonte

sam7x can now be compiled by armcc under scons.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1485 bbd45198-f89e-11dd-88c7-29a3b14d5316
mbbill@gmail.com 14 anos atrás
pai
commit
3077aea698
3 arquivos alterados com 29 adições e 14 exclusões
  1. 10 10
      bsp/sam7x/project.uvproj
  2. 4 4
      bsp/sam7x/rtconfig.py
  3. 15 0
      bsp/sam7x/sam7x_rom.sct

+ 10 - 10
bsp/sam7x/project.uvproj

@@ -33,8 +33,8 @@
           <BinPath></BinPath>
           <IncludePath></IncludePath>
           <LibPath></LibPath>
-          <RegisterFilePath>Atmel\SAM7X\</RegisterFilePath>
-          <DBRegisterFilePath>Atmel\SAM7X\</DBRegisterFilePath>
+          <RegisterFilePath>Atmel\SAM7X\</RegisterFilePath>
+          <DBRegisterFilePath>Atmel\SAM7X\</DBRegisterFilePath>
           <TargetStatus>
             <Error>0</Error>
             <ExitCodeStop>0</ExitCodeStop>
@@ -46,7 +46,7 @@
           <OutputName>rtthread-sam7x</OutputName>
           <CreateExecutable>1</CreateExecutable>
           <CreateLib>0</CreateLib>
-          <CreateHexFile>0</CreateHexFile>
+          <CreateHexFile>1</CreateHexFile>
           <DebugInformation>1</DebugInformation>
           <BrowseInformation>1</BrowseInformation>
           <ListingPath>.\objs\</ListingPath>
@@ -114,9 +114,9 @@
             <Oh166RecLen>16</Oh166RecLen>
           </OPTHX>
           <Simulator>
-            <UseSimulator>1</UseSimulator>
+            <UseSimulator>0</UseSimulator>
             <LoadApplicationAtStartup>1</LoadApplicationAtStartup>
-            <RunToMain>0</RunToMain>
+            <RunToMain>1</RunToMain>
             <RestoreBreakpoints>1</RestoreBreakpoints>
             <RestoreWatchpoints>1</RestoreWatchpoints>
             <RestoreMemoryDisplay>1</RestoreMemoryDisplay>
@@ -125,7 +125,7 @@
             <LimitSpeedToRealTime>0</LimitSpeedToRealTime>
           </Simulator>
           <Target>
-            <UseTarget>0</UseTarget>
+            <UseTarget>1</UseTarget>
             <LoadApplicationAtStartup>1</LoadApplicationAtStartup>
             <RunToMain>1</RunToMain>
             <RestoreBreakpoints>1</RestoreBreakpoints>
@@ -135,7 +135,7 @@
             <RestoreToolbox>1</RestoreToolbox>
           </Target>
           <RunDebugAfterBuild>0</RunDebugAfterBuild>
-          <TargetSelection>2</TargetSelection>
+          <TargetSelection>6</TargetSelection>
           <SimDlls>
             <CpuDll></CpuDll>
             <CpuDllArguments></CpuDllArguments>
@@ -159,7 +159,7 @@
             <RunIndependent>0</RunIndependent>
             <UpdateFlashBeforeDebugging>0</UpdateFlashBeforeDebugging>
             <Capability>1</Capability>
-            <DriverSelection>4100</DriverSelection>
+            <DriverSelection>4098</DriverSelection>
           </Flash1>
           <Flash2>Segger\JLTAgdi.dll</Flash2>
           <Flash3>"" ()</Flash3>
@@ -211,9 +211,9 @@
             <EndSel>0</EndSel>
             <uLtcg>0</uLtcg>
             <RoSelD>3</RoSelD>
-            <RwSelD>3</RwSelD>
+            <RwSelD>5</RwSelD>
             <CodeSel>0</CodeSel>
-            <OptFeed>1</OptFeed>
+            <OptFeed>0</OptFeed>
             <NoZi1>0</NoZi1>
             <NoZi2>0</NoZi2>
             <NoZi3>0</NoZi3>

+ 4 - 4
bsp/sam7x/rtconfig.py

@@ -53,10 +53,10 @@ elif PLATFORM == 'armcc':
     LINK = 'armlink'
     TARGET_EXT = 'axf'
 
-    DEVICE = ' --device DARMSS9'
-    CFLAGS = DEVICE + ' --apcs=interwork --diag_suppress=870'
+    DEVICE = ' --device DARMATS'
+    CFLAGS = DEVICE + ' --apcs=interwork'
     AFLAGS = DEVICE
-    LFLAGS = DEVICE + ' --strict --info sizes --info totals --info unused --info veneers --list rtthread-mini2440.map --ro-base 0x30000000 --entry Entry_Point --first Entry_Point'
+    LFLAGS = DEVICE + ' --strict --info sizes --info totals --info unused --info veneers --list sam7x_rom_armcc.map --scatter sam7x_rom.sct'
 
     CFLAGS += ' -I"' + EXEC_PATH + '/ARM/RV31/INC"'
     LFLAGS += ' --libpath "' + EXEC_PATH + '/ARM/RV31/LIB"'
@@ -69,7 +69,7 @@ elif PLATFORM == 'armcc':
     else:
         CFLAGS += ' -O2'
 
-    POST_ACTION = 'fromelf --hex $TARGET --output rtthread-asm7x.hex \nfromelf -z $TARGET'
+    POST_ACTION = 'fromelf --i32 $TARGET --output rtthread-sam7x.hex \nfromelf -z $TARGET'
 
 elif PLATFORM == 'iar':
     # toolchains

+ 15 - 0
bsp/sam7x/sam7x_rom.sct

@@ -0,0 +1,15 @@
+; *************************************************************
+; *** Scatter-Loading Description File generated by uVision ***
+; *************************************************************
+
+LR_IROM1 0x00100000 0x00040000  {    ; load region size_region
+  ER_IROM1 0x00100000 0x00040000  {  ; load address = execution address
+   *.o (RESET, +First)
+   *(InRoot$$Sections)
+   .ANY (+RO)
+  }
+  RW_IRAM1 0x00200000 0x00010000  {  ; RW data
+   .ANY (+RW +ZI)
+  }
+}
+