Skip to content

Commit 2bd7b4d

Browse files
committed
added templates for LPC4088 and LPC11H37
target specific templates use a common template .cproject.tmpl and extend it by adding target information. This is necessary for the flash and debugging tools
1 parent 16c4150 commit 2bd7b4d

12 files changed

+54
-258
lines changed

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
"inherits": ["LPCTarget"],
401401
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"],
402402
"default_lib": "small",
403-
"release_versions": ["2"],
403+
"release_versions": ["2", "5"],
404404
"device_name": "LPC11U37HFBD64/401"
405405
},
406406
"ELEKTOR_COCORICO": {

tools/export/mcuxpresso/.cproject.tmpl

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -175,76 +175,7 @@
175175
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
176176
<storageModule moduleId="refreshScope"/>
177177
<storageModule moduleId="com.crt.config">
178-
<projectStorage>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&#13;
179-
&lt;TargetConfig&gt;&#13;
180-
&lt;Properties property_2="LPC177x_8x_407x_8x_512.cfx" property_3="NXP" property_4="LPC4088" property_count="5" version="70200"/&gt;&#13;
181-
&lt;infoList vendor="NXP"&gt;&lt;info chip="LPC4088" flash_driver="LPC177x_8x_407x_8x_512.cfx" match_id="0x481D3F47" name="LPC4088" stub="crt_emu_cm3_nxp"&gt;&lt;chip&gt;&lt;name&gt;LPC4088&lt;/name&gt;&#13;
182-
&lt;family&gt;LPC407x_8x&lt;/family&gt;&#13;
183-
&lt;vendor&gt;NXP (formerly Philips)&lt;/vendor&gt;&#13;
184-
&lt;reset board="None" core="Real" sys="Real"/&gt;&#13;
185-
&lt;clock changeable="TRUE" freq="12MHz" is_accurate="TRUE"/&gt;&#13;
186-
&lt;memory can_program="true" id="Flash" is_ro="true" type="Flash"/&gt;&#13;
187-
&lt;memory id="RAM" type="RAM"/&gt;&#13;
188-
&lt;memory id="Periph" is_volatile="true" type="Peripheral"/&gt;&#13;
189-
&lt;memoryInstance derived_from="Flash" id="MFlash512" location="0x0" size="0x80000"/&gt;&#13;
190-
&lt;memoryInstance derived_from="RAM" id="RamLoc64" location="0x10000000" size="0x10000"/&gt;&#13;
191-
&lt;memoryInstance derived_from="RAM" id="RamPeriph32" location="0x20000000" size="0x8000"/&gt;&#13;
192-
&lt;prog_flash blocksz="0x1000" location="0x0" maxprgbuff="0x1000" progwithcode="TRUE" size="0x10000"/&gt;&#13;
193-
&lt;prog_flash blocksz="0x8000" location="0x10000" maxprgbuff="0x1000" progwithcode="TRUE" size="0x70000"/&gt;&#13;
194-
&lt;peripheralInstance derived_from="V7M_MPU" id="MPU" location="0xe000ed90"/&gt;&#13;
195-
&lt;peripheralInstance derived_from="V7M_NVIC" id="NVIC" location="0xe000e000"/&gt;&#13;
196-
&lt;peripheralInstance derived_from="V7M_DCR" id="DCR" location="0xe000edf0"/&gt;&#13;
197-
&lt;peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/&gt;&#13;
198-
&lt;peripheralInstance derived_from="FLASHCTRL" id="FLASHCTRL" location="0x200000"/&gt;&#13;
199-
&lt;peripheralInstance derived_from="GPDMA" id="GPDMA" location="0x20080000"/&gt;&#13;
200-
&lt;peripheralInstance derived_from="ETHERNET" id="ETHERNET" location="0x20084000"/&gt;&#13;
201-
&lt;peripheralInstance derived_from="LCD" id="LCD" location="0x20088000"/&gt;&#13;
202-
&lt;peripheralInstance derived_from="USB" id="USB" location="0x2008c000"/&gt;&#13;
203-
&lt;peripheralInstance derived_from="CRC" id="CRC" location="0x20090000"/&gt;&#13;
204-
&lt;peripheralInstance derived_from="GPIO" id="GPIO" location="0x20098000"/&gt;&#13;
205-
&lt;peripheralInstance derived_from="EMC" id="EMC" location="0x2009c000"/&gt;&#13;
206-
&lt;peripheralInstance derived_from="WWDT" id="WWDT" location="0x40000000"/&gt;&#13;
207-
&lt;peripheralInstance derived_from="TIMER0" id="TIMER0" location="0x40004000"/&gt;&#13;
208-
&lt;peripheralInstance derived_from="TIMER1" id="TIMER1" location="0x40008000"/&gt;&#13;
209-
&lt;peripheralInstance derived_from="UART0" id="UART0" location="0x4000c000"/&gt;&#13;
210-
&lt;peripheralInstance derived_from="UART1" id="UART1" location="0x40010000"/&gt;&#13;
211-
&lt;peripheralInstance derived_from="PWM0" id="PWM0" location="0x40014000"/&gt;&#13;
212-
&lt;peripheralInstance derived_from="PWM1" id="PWM1" location="0x40018000"/&gt;&#13;
213-
&lt;peripheralInstance derived_from="I2C0" id="I2C0" location="0x4001c000"/&gt;&#13;
214-
&lt;peripheralInstance derived_from="COMPARATOR" id="COMPARATOR" location="0x40020000"/&gt;&#13;
215-
&lt;peripheralInstance derived_from="RTC" id="RTC" location="0x40024000"/&gt;&#13;
216-
&lt;peripheralInstance derived_from="GPIOINT" id="GPIOINT" location="0x40028080"/&gt;&#13;
217-
&lt;peripheralInstance derived_from="IOCON" id="IOCON" location="0x4002c000"/&gt;&#13;
218-
&lt;peripheralInstance derived_from="SSP1" id="SSP1" location="0x40030000"/&gt;&#13;
219-
&lt;peripheralInstance derived_from="ADC" id="ADC" location="0x40034000"/&gt;&#13;
220-
&lt;peripheralInstance derived_from="CANAFRAM" id="CANAFRAM" location="0x40038000"/&gt;&#13;
221-
&lt;peripheralInstance derived_from="CANAF" id="CANAF" location="0x4003c000"/&gt;&#13;
222-
&lt;peripheralInstance derived_from="CCAN" id="CCAN" location="0x40040000"/&gt;&#13;
223-
&lt;peripheralInstance derived_from="CAN1" id="CAN1" location="0x40044000"/&gt;&#13;
224-
&lt;peripheralInstance derived_from="CAN2" id="CAN2" location="0x40048000"/&gt;&#13;
225-
&lt;peripheralInstance derived_from="I2C1" id="I2C1" location="0x4005c000"/&gt;&#13;
226-
&lt;peripheralInstance derived_from="SSP0" id="SSP0" location="0x40088000"/&gt;&#13;
227-
&lt;peripheralInstance derived_from="DAC" id="DAC" location="0x4008c000"/&gt;&#13;
228-
&lt;peripheralInstance derived_from="TIMER2" id="TIMER2" location="0x40090000"/&gt;&#13;
229-
&lt;peripheralInstance derived_from="TIMER3" id="TIMER3" location="0x40094000"/&gt;&#13;
230-
&lt;peripheralInstance derived_from="UART2" id="UART2" location="0x40098000"/&gt;&#13;
231-
&lt;peripheralInstance derived_from="UART3" id="UART3" location="0x4009c000"/&gt;&#13;
232-
&lt;peripheralInstance derived_from="I2C2" id="I2C2" location="0x400a0000"/&gt;&#13;
233-
&lt;peripheralInstance derived_from="UART4" id="UART4" location="0x400a4000"/&gt;&#13;
234-
&lt;peripheralInstance derived_from="I2S" id="I2S" location="0x400a8000"/&gt;&#13;
235-
&lt;peripheralInstance derived_from="SSP2" id="SSP2" location="0x400ac000"/&gt;&#13;
236-
&lt;peripheralInstance derived_from="MCPWM" id="MCPWM" location="0x400b8000"/&gt;&#13;
237-
&lt;peripheralInstance derived_from="QEI" id="QEI" location="0x400bc000"/&gt;&#13;
238-
&lt;peripheralInstance derived_from="SDMMC" id="SDMMC" location="0x400c0000"/&gt;&#13;
239-
&lt;peripheralInstance derived_from="SYSCON" id="SYSCON" location="0x400fc000"/&gt;&#13;
240-
&lt;/chip&gt;&#13;
241-
&lt;processor&gt;&lt;name gcc_name="cortex-m4"&gt;Cortex-M4&lt;/name&gt;&#13;
242-
&lt;family&gt;Cortex-M&lt;/family&gt;&#13;
243-
&lt;/processor&gt;&#13;
244-
&lt;link href="nxp_lpc407x_8x_peripheral.xme" show="embed" type="simple"/&gt;&#13;
245-
&lt;/info&gt;&#13;
246-
&lt;/infoList&gt;&#13;
247-
&lt;/TargetConfig&gt;</projectStorage>
178+
<projectStorage>{% block cpu_config %}{% endblock %}</projectStorage>
248179
</storageModule>
249180
<storageModule moduleId="com.crt.advproject"/>
250181
</cproject>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{% extends "mcuxpresso/.cproject.tmpl" %}
2+
3+
{% block cpu_config %}&lt;?xml version="1.0" encoding="UTF-8"?&gt;&#13;
4+
&lt;TargetConfig&gt;&#13;
5+
&lt;Properties property_2="LPC11_12_13_128K_8K.cfx" property_3="NXP" property_4="LPC11U37H/401" property_count="5" version="70200"/&gt;&#13;
6+
&lt;infoList vendor="NXP"&gt;&lt;info chip="LPC11U37H/401" flash_driver="LPC11_12_13_128K_8K.cfx" match_id="0x0" name="LPC11U37H/401" stub="crt_emu_lpc11_13_nxp"&gt;&lt;chip&gt;&lt;name&gt;LPC11U37H/401&lt;/name&gt;&#13;
7+
&lt;family&gt;LPC11Uxx&lt;/family&gt;&#13;
8+
&lt;vendor&gt;NXP (formerly Philips)&lt;/vendor&gt;&#13;
9+
&lt;reset board="None" core="Real" sys="Real"/&gt;&#13;
10+
&lt;clock changeable="TRUE" freq="12MHz" is_accurate="TRUE"/&gt;&#13;
11+
&lt;memory can_program="true" id="Flash" is_ro="true" type="Flash"/&gt;&#13;
12+
&lt;memory id="RAM" type="RAM"/&gt;&#13;
13+
&lt;memory id="Periph" is_volatile="true" type="Peripheral"/&gt;&#13;
14+
&lt;memoryInstance derived_from="Flash" id="MFlash128" location="0x0" size="0x20000"/&gt;&#13;
15+
&lt;memoryInstance derived_from="RAM" id="RamLoc8" location="0x10000000" size="0x2000"/&gt;&#13;
16+
&lt;memoryInstance derived_from="RAM" id="RamUsb2" location="0x20004000" size="0x800"/&gt;&#13;
17+
&lt;memoryInstance derived_from="RAM" id="RamIoh2" location="0x20000000" size="0x800"/&gt;&#13;
18+
&lt;peripheralInstance derived_from="V6M_NVIC" id="NVIC" location="0xe000e000"/&gt;&#13;
19+
&lt;peripheralInstance derived_from="V6M_DCR" id="DCR" location="0xe000edf0"/&gt;&#13;
20+
&lt;peripheralInstance derived_from="I2C" id="I2C" location="0x40000000"/&gt;&#13;
21+
&lt;peripheralInstance derived_from="WWDT" id="WWDT" location="0x40004000"/&gt;&#13;
22+
&lt;peripheralInstance derived_from="USART" id="USART" location="0x40008000"/&gt;&#13;
23+
&lt;peripheralInstance derived_from="CT16B0" id="CT16B0" location="0x4000c000"/&gt;&#13;
24+
&lt;peripheralInstance derived_from="CT16B1" id="CT16B1" location="0x40010000"/&gt;&#13;
25+
&lt;peripheralInstance derived_from="CT32B0" id="CT32B0" location="0x40014000"/&gt;&#13;
26+
&lt;peripheralInstance derived_from="CT32B1" id="CT32B1" location="0x40018000"/&gt;&#13;
27+
&lt;peripheralInstance derived_from="ADC" id="ADC" location="0x4001c000"/&gt;&#13;
28+
&lt;peripheralInstance derived_from="PMU" id="PMU" location="0x40038000"/&gt;&#13;
29+
&lt;peripheralInstance derived_from="FLASHCTRL" id="FLASHCTRL" location="0x4003c000"/&gt;&#13;
30+
&lt;peripheralInstance derived_from="SSP0" id="SSP0" location="0x40040000"/&gt;&#13;
31+
&lt;peripheralInstance derived_from="IOCON" id="IOCON" location="0x40044000"/&gt;&#13;
32+
&lt;peripheralInstance derived_from="SYSCON" id="SYSCON" location="0x40048000"/&gt;&#13;
33+
&lt;peripheralInstance derived_from="GPIO-PIN-INT" id="GPIO-PIN-INT" location="0x4004c000"/&gt;&#13;
34+
&lt;peripheralInstance derived_from="SSP1" id="SSP1" location="0x40058000"/&gt;&#13;
35+
&lt;peripheralInstance derived_from="GPIO-GROUP-INT0" id="GPIO-GROUP-INT0" location="0x4005c000"/&gt;&#13;
36+
&lt;peripheralInstance derived_from="GPIO-GROUP-INT1" id="GPIO-GROUP-INT1" location="0x40060000"/&gt;&#13;
37+
&lt;peripheralInstance derived_from="USB" id="USB" location="0x40080000"/&gt;&#13;
38+
&lt;peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x50000000"/&gt;&#13;
39+
&lt;/chip&gt;&#13;
40+
&lt;processor&gt;&lt;name gcc_name="cortex-m0"&gt;Cortex-M0&lt;/name&gt;&#13;
41+
&lt;family&gt;Cortex-M&lt;/family&gt;&#13;
42+
&lt;/processor&gt;&#13;
43+
&lt;link href="LPC11Uxx_peripheral.xme" show="embed" type="simple"/&gt;&#13;
44+
&lt;/info&gt;&#13;
45+
&lt;/infoList&gt;&#13;
46+
&lt;/TargetConfig&gt;{% endblock %}

tools/export/mcuxpresso/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def generate(self):
282282

283283
self.gen_file('mcuxpresso/.project.tmpl', jinja_ctx,
284284
'.project', trim_blocks=True, lstrip_blocks=True)
285-
self.gen_file('mcuxpresso/.cproject.tmpl', jinja_ctx,
285+
self.gen_file('mcuxpresso/{0}_cproject.tmpl'.format(target_name), jinja_ctx,
286286
'.cproject', trim_blocks=True, lstrip_blocks=True)
287287
# self.gen_file('mcuxpresso/makefile.targets.tmpl', jinja_ctx,
288288
# 'makefile.targets', trim_blocks=True, lstrip_blocks=True)
@@ -587,6 +587,7 @@ def process_options(self, opts, flags_in):
587587
self.remove_option(flags['common_flags'], '-mbig-endian')
588588

589589
opts['common']['arm.target.fpu.unit'] = None
590+
opts['common']['arm.target.fpu.unit_nxp'] = None
590591
# default, fpv4spd16, fpv5d16, fpv5spd16
591592
str = self.find_options(flags['common_flags'], '-mfpu=')
592593
if str != None:

tools/export/mcuxpresso/cproject_cm0_common.tmpl

Lines changed: 0 additions & 3 deletions
This file was deleted.

tools/export/mcuxpresso/cproject_cm3_common.tmpl

Lines changed: 0 additions & 3 deletions
This file was deleted.

tools/export/mcuxpresso/cproject_cm4_common.tmpl

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)