Skip to content

Commit 209310c

Browse files
Thomas SailerThomas Sailer
authored andcommitted
remove NCS36510 specific changes from this branch
1 parent f53154a commit 209310c

File tree

7 files changed

+8
-421
lines changed

7 files changed

+8
-421
lines changed

targets/TARGET_ONSEMI/TARGET_NCS36510/device/TOOLCHAIN_GCC_ARM/NCS36510.ld

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
*/
44

55
MEMORY {
6-
FIB (rx) : ORIGIN = 0x00002000, LENGTH = 0x00000800
7-
TRIM (rx) : ORIGIN = 0x00002800, LENGTH = 0x00000800
86
VECTORS (rx) : ORIGIN = 0x00003000, LENGTH = 0x00000090
9-
FLASH (rx) : ORIGIN = 0x00003090, LENGTH = 320K - 4K - 0x90
10-
RAM (rwx) : ORIGIN = 0x3FFF4090, LENGTH = 48K - 0x90 /* 8_byte_aligned(35 vectors * 4 bytes each) = 0x90 */
11-
}
7+
FLASH (rx) : ORIGIN = 0x00003090, LENGTH = 320K - 4K - 0x90
8+
RAM (rwx) : ORIGIN = 0x3FFF4090, LENGTH = 48K - 0x90 /* 8_byte_aligned(35 vectors * 4 bytes each) = 0x90 */
9+
}
1210

1311
/* Linker script to place sections and symbol values. Should be used together
1412
* with other linker script that defines memory regions FLASH and RAM.
@@ -39,17 +37,7 @@ MEMORY {
3937
ENTRY(Reset_Handler)
4038

4139
SECTIONS {
42-
.fib :
43-
{
44-
KEEP(*(.fib))
45-
} > FIB
46-
47-
.trim :
48-
{
49-
KEEP(*(.trim))
50-
} > TRIM
51-
52-
.isr_vector :
40+
.isr_vector :
5341
{
5442
__vector_table = .;
5543
KEEP(*(.vector_table))

targets/TARGET_ONSEMI/TARGET_NCS36510/ncs36510Init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ void fClockInit()
147147
for(Timer = 0; Timer < 10; Timer++);
148148

149149
/** - Enable calibration */
150-
//CLOCKREG->CCR.BITS.CAL32M = True;
150+
CLOCKREG->CCR.BITS.CAL32M = True;
151151

152152
/** - Wait calibration to be completed */
153-
//while(CLOCKREG->CSR.BITS.CAL32MDONE == False); /* If you stuck here, issue with internal 32M calibration */
153+
while(CLOCKREG->CSR.BITS.CAL32MDONE == False); /* If you stuck here, issue with internal 32M calibration */
154154

155155
/** - Check calibration status */
156-
//while(CLOCKREG->CSR.BITS.CAL32MFAIL == True); /* If you stuck here, issue with internal 32M calibration */
156+
while(CLOCKREG->CSR.BITS.CAL32MFAIL == True); /* If you stuck here, issue with internal 32M calibration */
157157

158158
/** - Power down internal 32MHz osc */
159159
PMUREG->CONTROL.BITS.INT32M = 1;

tools/export/codeblocks/__init__.py

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ def generate(self):
7878
not x.startswith('obj'))];
7979

8080
c_sources = [self.filter_dot(s) for s in self.resources.c_sources]
81-
ncs36510fib = (hasattr(self.toolchain.target, 'post_binary_hook') and
82-
self.toolchain.target.post_binary_hook['function'] == 'NCS36510TargetCode.ncs36510_addfib')
83-
if ncs36510fib:
84-
c_sources.append('ncs36510fib.c')
85-
c_sources.append('ncs36510trim.c')
8681

8782
ctx = {
8883
'project_name': self.project_name,
@@ -96,7 +91,6 @@ def generate(self):
9691
'include_paths': inc_dirs,
9792
'linker_script': self.filter_dot(self.resources.linker_script),
9893
'libraries': self.resources.libraries,
99-
'ncs36510addfib': ncs36510fib,
10094
'openocdboard': ''
10195
}
10296

@@ -123,36 +117,14 @@ def generate(self):
123117

124118
self.gen_file('codeblocks/cbp.tmpl', ctx, "%s.%s" % (self.project_name, 'cbp'))
125119

126-
if ncs36510fib:
127-
ctx = {
128-
'mac_addr_low': 0xFFFFFFFF,
129-
'mac_addr_high': 0xFFFFFFFF,
130-
'clk_32k_trim': 0x39,
131-
'clk_32m_trim': 0x17,
132-
'rssi': 0x3D,
133-
'txtune': 0xFFFFFFFF
134-
}
135-
if hasattr(self.toolchain.target, 'config'):
136-
for an, cn in [ ['mac-addr-low', 'mac_addr_low'],
137-
['mac-addr-high', 'mac_addr_high'],
138-
['32KHz-clk-trim', 'clk_32k_trim'],
139-
['32MHz-clk-trim', 'clk_32m_trim'],
140-
['rssi-trim', 'rssi'],
141-
['txtune-trim', 'txtune'] ]:
142-
if an in self.toolchain.target.config:
143-
if 'value' in self.toolchain.target.config[an]:
144-
ctx[cn] = int(self.toolchain.target.config[an]['value'], 0)
145-
for f in [ 'ncs36510fib.c', 'ncs36510trim.c' ]:
146-
self.gen_file("codeblocks/%s" % f, ctx, f)
147-
148120
# finally, generate the project file
149121
super(CodeBlocks, self).generate()
150122

151123
@staticmethod
152124
def clean(project_name):
153125
for ext in ['cbp', 'depend', 'layout']:
154126
remove("%s.%s" % (project_name, ext))
155-
for f in ['openocd.log', 'ncs36510fib.c', 'ncs36510trim.c']:
127+
for f in ['openocd.log']:
156128
remove(f)
157129
for d in ['bin', 'obj']:
158130
rmtree(d, ignore_errors=True)

tools/export/codeblocks/cbp.tmpl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@
2020
<Linker>
2121
<Add option='-Wl,-Map,&quot;bin/Debug/{{project_name}}.map&quot;' />
2222
</Linker>
23-
{% if ncs36510addfib -%}
24-
<ExtraCommands>
25-
<Add after="arm-none-eabi-objcopy -O ihex -R .fib -R .trim bin/Debug/{{project_name}}.elf bin/Debug/{{project_name}}.hex" />
26-
<Add after="mbed-os/tools/export/codeblocks/ncs36510addfib.py bin/Debug/{{project_name}}.hex bin/Debug/{{project_name}}.fib" />
27-
<Add after="arm-none-eabi-objcopy --update-section .fib=bin/Debug/{{project_name}}.fib bin/Debug/{{project_name}}.elf" />
28-
<Add after="arm-none-eabi-objcopy -O ihex bin/Debug/{{project_name}}.elf bin/Debug/{{project_name}}.hex" />
29-
</ExtraCommands>
30-
{% endif -%}
3123
</Target>
3224
<Target title="Release">
3325
<Option output="bin/Release/{{project_name}}.elf" prefix_auto="1" extension_auto="0" />
@@ -38,14 +30,6 @@
3830
<Linker>
3931
<Add option='-Wl,-Map,&quot;bin/Release/{{project_name}}.map&quot;' />
4032
</Linker>
41-
{% if ncs36510addfib -%}
42-
<ExtraCommands>
43-
<Add after="arm-none-eabi-objcopy -O ihex -R .fib -R .trim bin/Release/{{project_name}}.elf bin/Release/{{project_name}}.hex" />
44-
<Add after="mbed-os/tools/export/codeblocks/ncs36510addfib.py bin/Release/{{project_name}}.hex bin/Release/{{project_name}}.fib" />
45-
<Add after="arm-none-eabi-objcopy --update-section .fib=bin/Release/{{project_name}}.fib bin/Release/{{project_name}}.elf" />
46-
<Add after="arm-none-eabi-objcopy -O ihex bin/Release/{{project_name}}.elf bin/Release/{{project_name}}.hex" />
47-
</ExtraCommands>
48-
{% endif -%}
4933
</Target>
5034
</Build>
5135
<Compiler>

tools/export/codeblocks/ncs36510addfib.py

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

0 commit comments

Comments
 (0)