Skip to content

Commit 8fce3c3

Browse files
Added nucleo in tockloader-lib as well, removed unnecessary boards
Signed-off-by: Vlada <vladagrushchenko@gmail.com>
1 parent e48b2bf commit 8fce3c3

2 files changed

Lines changed: 5 additions & 194 deletions

File tree

tockloader-cli/src/known_boards.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pub enum KnownBoardNames {
33
NucleoF4,
44
MicrobitV2,
55
Nrf52840dk,
6+
NucleoU545ReQ,
67
}
78

89
impl KnownBoardNames {
@@ -11,6 +12,7 @@ impl KnownBoardNames {
1112
"nucleo-f4" => Some(Self::NucleoF4),
1213
"microbit-v2" => Some(Self::MicrobitV2),
1314
"nrf52840dk" => Some(Self::Nrf52840dk),
15+
"nucleo-u545re-q" => Some(Self::NucleoU545ReQ),
1416
_ => None,
1517
}
1618
}
@@ -20,6 +22,7 @@ impl KnownBoardNames {
2022
KnownBoardNames::NucleoF4 => "nucleo-f4",
2123
KnownBoardNames::MicrobitV2 => "microbit-v2",
2224
KnownBoardNames::Nrf52840dk => "nrf52840dk",
25+
KnownBoardNames::NucleoU545ReQ => "nucleo-u545re-q",
2326
}
2427
}
2528
}
@@ -29,6 +32,7 @@ pub fn list_known_board_names() -> Vec<KnownBoardNames> {
2932
KnownBoardNames::NucleoF4,
3033
KnownBoardNames::MicrobitV2,
3134
KnownBoardNames::Nrf52840dk,
35+
KnownBoardNames::NucleoU545ReQ,
3236
]
3337
}
3438

@@ -49,6 +53,7 @@ mod tests {
4953
KnownBoardNames::NucleoF4,
5054
KnownBoardNames::MicrobitV2,
5155
KnownBoardNames::Nrf52840dk,
56+
KnownBoardNames::NucleoU545ReQ,
5257
];
5358

5459
assert_eq!(list_known_board_names(), backup_list, "If this fails it means that you likely forgot to update `list_known_boards`, and subsequently the `list_known_boards_updated` test");

tockloader-lib/src/known_boards.rs

Lines changed: 0 additions & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,6 @@ impl KnownBoard for Nrf52840dk {
7979
}
8080
}
8181

82-
pub struct RaspberryPiPico;
83-
84-
impl KnownBoard for RaspberryPiPico {
85-
fn serial_target_info(&self) -> SerialTargetInfo {
86-
SerialTargetInfo::default()
87-
}
88-
89-
fn probe_target_info(&self) -> ProbeTargetInfo {
90-
ProbeTargetInfo {
91-
chip: "RP2040".to_string(),
92-
core: 0,
93-
}
94-
}
95-
96-
fn get_settings(&self) -> BoardSettings {
97-
BoardSettings {
98-
arch: Some("cortex-m0".to_string()),
99-
start_address:0x10000000,
100-
page_size: 4096,
101-
ram_start_address: 0x20000000,
102-
}
103-
}
104-
}
105-
10682
pub struct NucleoU545ReQ;
10783

10884
impl KnownBoard for NucleoU545ReQ {
@@ -126,173 +102,3 @@ impl KnownBoard for NucleoU545ReQ {
126102
}
127103
}
128104
}
129-
130-
pub struct LPC55S69;
131-
132-
impl KnownBoard for LPC55S6x{
133-
fn serial_target_info(&self) -> SerialTargetInfo {
134-
SerialTargetInfo::default()
135-
}
136-
137-
fn probe_target_info(&self) -> ProbeTargetInfo {
138-
ProbeTargetInfo {
139-
chip: "LPC55S69".to_string(),
140-
core: 0,
141-
}
142-
}
143-
144-
fn get_settings(&self) -> BoardSettings {
145-
BoardSettings {
146-
arch: Some("cortex-m4".to_string()),
147-
start_address:0x00000000,
148-
page_size: 512,
149-
ram_start_address: 0x20000000,
150-
}
151-
}
152-
}
153-
154-
pub struct ATSAM4LC8C;
155-
156-
impl KnownBoard for ATSAM4LC8C{
157-
fn serial_target_info(&self) -> SerialTargetInfo {
158-
SerialTargetInfo::default()
159-
}
160-
161-
fn probe_target_info(&self) -> ProbeTargetInfo {
162-
ProbeTargetInfo {
163-
chip: "ATSAM4LC8C".to_string(),
164-
core: 0,
165-
}
166-
}
167-
168-
fn get_settings(&self) -> BoardSettings {
169-
BoardSettings {
170-
arch: Some("cortex-m4".to_string()),
171-
start_address: 0x00000000,
172-
page_size: 512,
173-
ram_start_address: 0x20000000,
174-
}
175-
}
176-
}
177-
178-
pub struct Nrf51422dk;
179-
180-
impl KnownBoard for Nfr51422dk {
181-
fn serial_target_info(&self) -> SerialTargetInfo {
182-
SerialTargetInfo::default()
183-
}
184-
185-
fn probe_target_info(&self) -> ProbeTargetInfo {
186-
ProbeTargetInfo {
187-
chip: "nRF51422_xxAC".to_string(),
188-
core: 0,
189-
}
190-
}
191-
192-
fn get_settings(&self) -> BoardSettings {
193-
BoardSettings {
194-
arch: Some("cortex-m0".to_string()),
195-
start_address: 0x00000000,
196-
page_size: 1024,
197-
ram_start_address: 0x20000000,
198-
}
199-
}
200-
}
201-
202-
pub struct Nano33BLE;
203-
204-
impl KnownBoard for Nano33BLE {
205-
fn serial_target_info(&self) -> SerialTargetInfo {
206-
SerialTargetInfo::default()
207-
}
208-
209-
fn probe_target_info(&self) -> ProbeTargetInfo {
210-
ProbeTargetInfo {
211-
chip: "nRF52480_xxAA".to_string(),
212-
core: 0,
213-
}
214-
}
215-
216-
fn get_settings(&self) -> BoardSettings {
217-
BoardSettings {
218-
arch: Some("cortex-m4".to_string()),
219-
start_address: 0x00027000,
220-
page_size: 4096,
221-
ram_start_address: 0x20020000,
222-
}
223-
}
224-
}
225-
226-
pub struct CC2652R1F;
227-
228-
impl KnownBoard for CC2652R1F {
229-
fn serial_target_info(&self) -> SerialTargetInfo {
230-
SerialTargetInfo::default()
231-
}
232-
233-
fn probe_target_info(&self) -> ProbeTargetInfo {
234-
ProbeTargetInfo {
235-
chip: "CC2652R1F".to_string(),
236-
core: 0,
237-
}
238-
}
239-
240-
fn get_settings(&self) -> BoardSettings {
241-
BoardSettings {
242-
arch: Some("cortex-m4".to_string()),
243-
start_address: 0x00000000,
244-
page_size: 512,
245-
ram_start_address: 0x20000000,
246-
}
247-
}
248-
}
249-
250-
pub struct EkTm4c1294xl;
251-
252-
impl KnownBoard for EkTm4c1294xl{
253-
fn serial_target_info(&self) -> SerialTargetInfo {
254-
SerialTargetInfo::default()
255-
}
256-
257-
fn probe_target_info(&self) -> ProbeTargetInfo {
258-
ProbeTargetInfo {
259-
chip: "TM4C1294NCPDT".to_string(),
260-
core: 0,
261-
}
262-
}
263-
264-
fn get_settings(&self) -> BoardSettings {
265-
BoardSettings {
266-
arch: Some("cortex-m4".to_string()),
267-
start_address: 0x00000000,
268-
page_size: 512,
269-
ram_start_address: 0x20000000,
270-
}
271-
}
272-
}
273-
274-
pub struct Cy8Proto624343w;
275-
276-
impl KnownBoard for Cy8Proto624343w {
277-
fn serial_target_info(&self) -> SerialTargetInfo {
278-
SerialTargetInfo::default()
279-
}
280-
281-
fn probe_target_info(&self) -> ProbeTargetInfo {
282-
ProbeTargetInfo {
283-
chip: "CY8C624AAZI-S2D44".to_string(),
284-
core: 0,
285-
}
286-
}
287-
288-
fn get_settings(&self) -> BoardSettings {
289-
BoardSettings {
290-
arch: Some("cortex-m0".to_string()),
291-
start_address: 0x10000000,
292-
page_size: 512,
293-
ram_start_address: 0x08000000,
294-
}
295-
}
296-
}
297-
// boards left to describe: opentitan_earlgrey_secure_boot, opentitan_earlgrey, particle_boron,
298-
// sma_q3, edu-ciaa, hifive1b, stm32f3 and f4 discovery, arty, litexes, veer_el2_sim, qemus

0 commit comments

Comments
 (0)