Refs #363. Updated GCC Makefiles in the Olimex LPC-L2294 demo programs.

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@342 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2017-08-16 16:03:59 +00:00
parent eea02437d7
commit 2048d05961
19 changed files with 8 additions and 431 deletions

View File

@ -196,11 +196,11 @@ Idx Name Size VMA LMA File off Algn
CONTENTS, READONLY, DEBUGGING
78 .debug_macro 00001d6a 00000000 00000000 00024db0 2**0
CONTENTS, READONLY, DEBUGGING
79 .debug_str 000080fd 00000000 00000000 00026b1a 2**0
79 .debug_str 000080ff 00000000 00000000 00026b1a 2**0
CONTENTS, READONLY, DEBUGGING
80 .debug_frame 00000754 00000000 00000000 0002ec18 2**2
80 .debug_frame 00000754 00000000 00000000 0002ec1c 2**2
CONTENTS, READONLY, DEBUGGING
81 .debug_loc 00000f18 00000000 00000000 0002f36c 2**0
81 .debug_loc 00000f18 00000000 00000000 0002f370 2**0
CONTENTS, READONLY, DEBUGGING
SYMBOL TABLE:
00000000 l d .text 00000000 .text

View File

@ -61,7 +61,8 @@
* in bits/second. Two CAN messages are reserved for communication with the host. The
* message identifier for sending data from the target to the host is configured with
* BOOT_COM_CAN_TXMSG_ID. The one for receiving data from the host is configured with
* BOOT_COM_CAN_RXMSG_ID. The maximum amount of data bytes in a message for data
* BOOT_COM_CAN_RXMSG_ID. Note that an extended 29-bit CAN identifier is configured by
* OR-ing with mask 0x80000000. The maximum amount of data bytes in a message for data
* transmission and reception is set through BOOT_COM_CAN_TX_MAX_DATA and
* BOOT_COM_CAN_RX_MAX_DATA, respectively. It is common for a microcontroller to have more
* than 1 CAN controller on board. The zero-based BOOT_COM_CAN_CHANNEL_INDEX selects the
@ -73,11 +74,11 @@
/** \brief Configure the desired CAN baudrate. */
#define BOOT_COM_CAN_BAUDRATE (500000)
/** \brief Configure CAN message ID target->host. */
#define BOOT_COM_CAN_TX_MSG_ID (0x7E1)
#define BOOT_COM_CAN_TX_MSG_ID (0x7E1 /*| 0x80000000*/)
/** \brief Configure number of bytes in the target->host CAN message. */
#define BOOT_COM_CAN_TX_MAX_DATA (8)
/** \brief Configure CAN message ID host->target. */
#define BOOT_COM_CAN_RX_MSG_ID (0x667)
#define BOOT_COM_CAN_RX_MSG_ID (0x667 /*| 0x80000000*/)
/** \brief Configure number of bytes in the host->target CAN message. */
#define BOOT_COM_CAN_RX_MAX_DATA (8)
/** \brief Select the desired CAN peripheral as a zero based index. */

View File

@ -1,2 +0,0 @@
@echo off
cs-make --directory=../ all

View File

@ -1,2 +0,0 @@
@echo off
cs-make --directory=../ clean

View File

@ -1,5 +0,0 @@
@echo off
REM Establishes a JTAG connection with the CPU so that a GDB or Insight
REM debugging session can be started. Settings are for Remote/TCP
REM with hostname localhost on port 3333.
"C:\Program Files (x86)\OpenOCD\0.4.0\bin\openocd.exe" -f debug.cfg

View File

@ -1,67 +0,0 @@
set CPUTAPID 0x4f1f0f0f
source [find interface/olimex-arm-usb-tiny-h.cfg]
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc2294
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
# force an error till we get a good number
set _CPUTAPID 0xffffffff
}
jtag_nsrst_delay 200
jtag_ntrst_delay 200
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
#flash configuration
#flash bank lpc2000 <base> <size> 0 0 <target#> <variant>
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 20000 calc_checksum
jtag_khz 0
flash bank none cfi 0x80000000 0x200000 2 2 $_TARGETNAME
init
arm7_9 dcc_downloads enable
arm7_9 fast_memory_access enable
reset
sleep 500
halt
soft_reset_halt
gdb_breakpoint_override hard
#PLL according to Ecos
mww 0xE01FC080 0x1
mww 0xE01FC084 0x22
mww 0xE01FC08C 0xAA
mww 0xE01FC08C 0x55
sleep 200
mww 0xE01FC080 0x3
mww 0xE01FC08C 0xAA
mww 0xE01FC08C 0x55
mww 0xE01FC004 0x4
mww 0xE01FC000 0x2
#MEMMAP
mww 0xE01FC040 0x0001

View File

@ -1,3 +0,0 @@
@echo off
REM Loads the program into flash eeprom through the JTAG interface
"C:\Program Files (x86)\OpenOCD\0.4.0\bin\openocd.exe" -f flash.cfg

View File

@ -1,79 +0,0 @@
set CPUTAPID 0x4f1f0f0f
source [find interface/olimex-arm-usb-tiny-h.cfg]
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc2294
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
# force an error till we get a good number
set _CPUTAPID 0xffffffff
}
jtag_nsrst_delay 200
jtag_ntrst_delay 200
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
#flash configuration
#flash bank lpc2000 <base> <size> 0 0 <target#> <variant>
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 20000 calc_checksum
jtag_khz 0
flash bank none cfi 0x80000000 0x200000 2 2 $_TARGETNAME
init
arm7_9 dcc_downloads enable
arm7_9 fast_memory_access enable
reset
sleep 500
halt
soft_reset_halt
#PLL according to Ecos
mww 0xE01FC080 0x1
mww 0xE01FC084 0x22
mww 0xE01FC08C 0xAA
mww 0xE01FC08C 0x55
sleep 200
mww 0xE01FC080 0x3
mww 0xE01FC08C 0xAA
mww 0xE01FC08C 0x55
sleep 200
mww 0xE01FC004 0x4
mww 0xE01FC000 0x2
sleep 200
#MEMMAP
mww 0xE01FC040 0x0001
reset run
sleep 500
halt
flash probe 0
sleep 1000
flash write_image erase unlock ../bin/openblt_olimex_lpc_l2294_20mhz.elf
reset run
shutdown

View File

@ -1,133 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Project Name="DemoBoot" InternalType="">
<Plugins>
<Plugin Name="qmake">
<![CDATA[00010001N0005Debug000000000000]]>
</Plugin>
</Plugins>
<VirtualDirectory Name="Demo">
<VirtualDirectory Name="ARM7_LPC2000_Olimex_LPC_L2294_GCC">
<VirtualDirectory Name="Boot">
<File Name="../blt_conf.h"/>
<File Name="../extflash.c"/>
<File Name="../extflash.h"/>
<File Name="../hooks.c"/>
<File Name="../lpc2294.h"/>
<File Name="../main.c"/>
</VirtualDirectory>
</VirtualDirectory>
</VirtualDirectory>
<Description/>
<Dependencies/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="">
<IncludePath Value="."/>
</Compiler>
<Linker Options="">
<LibraryPath Value="."/>
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="gnu gcc" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g" C_Options="-g" Required="yes" PreCompiledHeader="">
<IncludePath Value="."/>
</Compiler>
<Linker Options="" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="" IntermediateDirectory="../obj" Command="openbtl_olimex_lpc_l2294_20mhz.elf" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/../bin" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<Debugger IsRemote="yes" RemoteHostName="localhost" RemoteHostPort="3333" DebuggerPath="C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin\arm-none-eabi-gdb.exe">
<PostConnectCommands/>
<StartupCommands>break main
continue
</StartupCommands>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="yes">
<RebuildCommand/>
<CleanCommand>make clean</CleanCommand>
<BuildCommand>make</BuildCommand>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory>$(WorkspacePath)/..</WorkingDirectory>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
<Configuration Name="Release" CompilerType="gnu gcc" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="" C_Options="" Required="yes" PreCompiledHeader="">
<IncludePath Value="."/>
</Compiler>
<Linker Options="-O2" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="" IntermediateDirectory="./Release" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="yes">
<RebuildCommand/>
<CleanCommand>make clean</CleanCommand>
<BuildCommand>make</BuildCommand>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory>$(WorkspacePath)</WorkingDirectory>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
</Settings>
<VirtualDirectory Name="Source">
<File Name="../../../../Source/assert.c"/>
<File Name="../../../../Source/assert.h"/>
<File Name="../../../../Source/backdoor.c"/>
<File Name="../../../../Source/backdoor.h"/>
<File Name="../../../../Source/boot.c"/>
<File Name="../../../../Source/boot.h"/>
<File Name="../../../../Source/can.h"/>
<File Name="../../../../Source/com.c"/>
<File Name="../../../../Source/com.h"/>
<File Name="../../../../Source/cop.c"/>
<File Name="../../../../Source/cop.h"/>
<File Name="../../../../Source/cpu.h"/>
<File Name="../../../../Source/file.c"/>
<File Name="../../../../Source/file.h"/>
<File Name="../../../../Source/net.c"/>
<File Name="../../../../Source/net.h"/>
<File Name="../../../../Source/nvm.h"/>
<File Name="../../../../Source/plausibility.h"/>
<File Name="../../../../Source/timer.h"/>
<File Name="../../../../Source/uart.h"/>
<File Name="../../../../Source/usb.h"/>
<File Name="../../../../Source/xcp.c"/>
<File Name="../../../../Source/xcp.h"/>
<VirtualDirectory Name="ARM7_LPC2000">
<File Name="../../../../Source/ARM7_LPC2000/can.c"/>
<File Name="../../../../Source/ARM7_LPC2000/cpu.c"/>
<File Name="../../../../Source/ARM7_LPC2000/nvm.c"/>
<File Name="../../../../Source/ARM7_LPC2000/timer.c"/>
<File Name="../../../../Source/ARM7_LPC2000/types.h"/>
<File Name="../../../../Source/ARM7_LPC2000/uart.c"/>
<VirtualDirectory Name="GCC">
<File Name="../../../../Source/ARM7_LPC2000/GCC/cstart.s"/>
<File Name="../../../../Source/ARM7_LPC2000/GCC/flash.c"/>
<File Name="../../../../Source/ARM7_LPC2000/GCC/flash.h"/>
<File Name="../../../../Source/ARM7_LPC2000/GCC/vectors.c"/>
<File Name="../../../../Source/ARM7_LPC2000/GCC/cpu_comp.c"/>
</VirtualDirectory>
</VirtualDirectory>
</VirtualDirectory>
</CodeLite_Project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="DemoBoot" Database="./DemoBoot.tags">
<Project Name="DemoBoot" Path="DemoBoot.project" Active="Yes"/>
<BuildMatrix>
<WorkspaceConfiguration Name="Debug" Selected="yes">
<Project Name="DemoBoot" ConfigName="Debug"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="Release" Selected="yes">
<Project Name="DemoBoot" ConfigName="Release"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CodeLite_Workspace>

View File

@ -1,4 +0,0 @@
Integrated Development Environment
----------------------------------
Codelite was used as the editor during the development of this software program. This directory contains the Codelite
workspace and project files. Codelite is a cross platform open source C/C++ IDE, available at http://www.codelite.org/.

View File

@ -94,7 +94,7 @@ Idx Name Size VMA LMA File off Algn
CONTENTS, READONLY, DEBUGGING
33 .debug_macro 00001361 00000000 00000000 00004005 2**0
CONTENTS, READONLY, DEBUGGING
34 .debug_str 000068c7 00000000 00000000 00005366 2**0
34 .debug_str 000068c9 00000000 00000000 00005366 2**0
CONTENTS, READONLY, DEBUGGING
35 .debug_frame 0000020c 00000000 00000000 0000bc30 2**2
CONTENTS, READONLY, DEBUGGING

View File

@ -1,2 +0,0 @@
@echo off
cs-make --directory=../ all

View File

@ -1,2 +0,0 @@
@echo off
cs-make --directory=../ clean

View File

@ -1,97 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Project Name="DemoProg" InternalType="">
<Plugins>
<Plugin Name="qmake">
<![CDATA[00010001N0005Debug000000000000]]>
</Plugin>
</Plugins>
<Description/>
<Dependencies/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="">
<IncludePath Value="."/>
</Compiler>
<Linker Options="">
<LibraryPath Value="."/>
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="Debug" CompilerType="gnu gcc" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g" C_Options="-g" Required="yes" PreCompiledHeader="">
<IncludePath Value="."/>
</Compiler>
<Linker Options="" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="" IntermediateDirectory="../obj" Command="demoprog_olimex_lpc_l2294_20mhz.elf" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(WorkspacePath)/../bin" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<Debugger IsRemote="yes" RemoteHostName="localhost" RemoteHostPort="3333" DebuggerPath="C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin\arm-none-eabi-gdb.exe">
<PostConnectCommands/>
<StartupCommands>break main
continue
</StartupCommands>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="yes">
<RebuildCommand/>
<CleanCommand>make clean</CleanCommand>
<BuildCommand>make</BuildCommand>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory>$(WorkspacePath)/..</WorkingDirectory>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
<Configuration Name="Release" CompilerType="gnu gcc" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="" C_Options="" Required="yes" PreCompiledHeader="">
<IncludePath Value="."/>
</Compiler>
<Linker Options="-O2" Required="yes"/>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="" IntermediateDirectory="./Release" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
</Debugger>
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="yes">
<RebuildCommand/>
<CleanCommand>make clean</CleanCommand>
<BuildCommand>make</BuildCommand>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
<ThirdPartyToolName>None</ThirdPartyToolName>
<WorkingDirectory>$(WorkspacePath)</WorkingDirectory>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
</Settings>
<VirtualDirectory Name="Prog">
<File Name="../cstart.s"/>
<File Name="../main.c"/>
<File Name="../vectors.c"/>
<File Name="../memory.x"/>
<File Name="../boot.c"/>
<File Name="../boot.h"/>
<File Name="../lpc2294.h"/>
<File Name="../header.h"/>
<File Name="../irq.c"/>
<File Name="../irq.h"/>
<File Name="../led.c"/>
<File Name="../led.h"/>
<File Name="../timer.c"/>
<File Name="../timer.h"/>
</VirtualDirectory>
</CodeLite_Project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="DemoProg" Database="./DemoProg.tags">
<Project Name="DemoProg" Path="DemoProg.project" Active="Yes"/>
<BuildMatrix>
<WorkspaceConfiguration Name="Debug" Selected="yes">
<Project Name="DemoProg" ConfigName="Debug"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="Release" Selected="yes">
<Project Name="DemoProg" ConfigName="Release"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CodeLite_Workspace>

View File

@ -1,4 +0,0 @@
Integrated Development Environment
----------------------------------
Codelite was used as the editor during the development of this software program. This directory contains the Codelite
workspace and project files. Codelite is a cross platform open source C/C++ IDE, available at http://www.codelite.org/.