Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate RAL for imxrt1180 #51

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ reserved fields.

Fix the documentation associated with IOMUXC field values.

Add support for NXP's i.MX RT 1189 dual-core MCUs. An `"imxrt1189_cm33"` feature
targets the Cortex-M33, and an `"imxrt1189_cm7"` feature targets the Cortex-M7.

## [0.5.0] 2022-12-27

Add support for NXP's i.MX RT 1176 dual-core MCUs. An `"imxrt1176_cm7"` feature
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ imxrt1062 = ["cortex-m"]
imxrt1064 = ["cortex-m"]
imxrt1176_cm4 = ["cortex-m"]
imxrt1176_cm7 = ["cortex-m"]
imxrt1189_cm33 = ["cortex-m"]
imxrt1189_cm7 = ["cortex-m"]

[workspace]
members = [
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

SHELL := /usr/bin/env bash
DEVICES ?= imxrt1011 imxrt1015 imxrt1021 imxrt1051 imxrt1052 imxrt1061 imxrt1062 imxrt1064 \
imxrt1176_cm7 imxrt1176_cm4
imxrt1176_cm7 imxrt1176_cm4 imxrt1189_cm33 imxrt1189_cm7

all: patch crate rustfmt check

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ The `imxrt-ral` supports these i.MX RT processors:
- [x] `"imxrt1064"`
- [x] `"imxrt1176_cm4"`
- [x] `"imxrt1176_cm7"`
- [x] `"imxrt1189_cm33"`
- [x] `"imxrt1189_cm7"`

The RAL also **requires** a feature flag to specify the processor variant. The RAL is [on crates.io](https://crates.io/crates/imxrt-ral). The RAL provides the `"rt"` feature flag, and the interrupt table definition, that's used by the HAL.

Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ fn main() {
"src/imxrt1176_cm4.x"
} else if env::var_os("CARGO_FEATURE_IMXRT1176_CM7").is_some() {
"src/imxrt1176_cm7.x"
} else if env::var_os("CARGO_FEATURE_IMXRT1189_CM33").is_some() {
"src/imxrt1189_cm33.x"
} else if env::var_os("CARGO_FEATURE_IMXRT1189_CM7").is_some() {
"src/imxrt1189_cm7.x"
} else {
panic!("No device features selected");
};
Expand Down
21 changes: 21 additions & 0 deletions devices/imxrt1189_cm33.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
_svd: "../svd/imxrt1189_cm33.svd"

_derive:
SW0_PORT2: SW0_PORT0

RGPIO*:
_array:
ICR*: {}

IOMUXC:
_modify:
SW_MUX_CTL_PAD_GPIO_SD_B2_12_DUMMY:
name: SW_MUX_CTL_PAD_GPIO_SD_B2_12
SW_PAD_CTL_PAD_GPIO_SD_B2_12_DUMMY:
name: SW_PAD_CTL_PAD_GPIO_SD_B2_12
IOMUXC_AON:
_modify:
SW_MUX_CTL_PAD_GPIO_AON_28_DUMMY:
name: SW_MUX_CTL_PAD_GPIO_AON_28
SW_PAD_CTL_PAD_GPIO_AON_28_DUMMY:
name: SW_PAD_CTL_PAD_GPIO_AON_28
21 changes: 21 additions & 0 deletions devices/imxrt1189_cm7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
_svd: "../svd/imxrt1189_cm7.svd"

_derive:
SW0_PORT2: SW0_PORT0

RGPIO*:
_array:
ICR*: {}

IOMUXC:
_modify:
SW_MUX_CTL_PAD_GPIO_SD_B2_12_DUMMY:
name: SW_MUX_CTL_PAD_GPIO_SD_B2_12
SW_PAD_CTL_PAD_GPIO_SD_B2_12_DUMMY:
name: SW_PAD_CTL_PAD_GPIO_SD_B2_12
IOMUXC_AON:
_modify:
SW_MUX_CTL_PAD_GPIO_AON_28_DUMMY:
name: SW_MUX_CTL_PAD_GPIO_AON_28
SW_PAD_CTL_PAD_GPIO_AON_28_DUMMY:
name: SW_PAD_CTL_PAD_GPIO_AON_28
51 changes: 51 additions & 0 deletions raltool-cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ transforms:
- Rename:
from: Mimxrt1176Cm4
to: imxrt1176_cm4
- Rename:
from: Mimxrt1189Cm33
to: imxrt1189_cm33
- Rename:
from: Mimxrt1189Cm7
to: imxrt1189_cm7
- Rename:
from: pit::Pit1
to: pit::Pit
Expand Down Expand Up @@ -130,6 +136,10 @@ transforms:
from: lpspi::vals::Hrsel
- DeleteEnums:
from: lpspi::vals::Pcspol
# The 1189 has two DMA peripherals. Avoid collision when unifying with 10xx
# names.
- Delete:
from: dma3::Dma3
# DMA and DMAMUX are suffixed with numbers on the 1176, since each core
# has its own instance. They're also suffixed on 10xx chips, even though
# there's just one instnace. Rename them so that the names are the same across
Expand Down Expand Up @@ -162,6 +172,47 @@ transforms:
fieldset: src::regs::Srsr
from: LOCKUP
to: LOCKUP_SYSRESETREQ
# Groups of 1189 peripherals that use derivedFrom but with meaningful names
# instead of plain numbering. raltool only handles the numbered case, so
# delete them until someone needs them.
- Delete:
from: aon_mif_ln28fdsoi_spllram::AonMifLn28fdsoiSpllram
- Delete:
from: aon_mif_s28spregh::AonMifS28spregh
- Delete:
from: aon_mix_slice::AonMixSlice
- Delete:
from: enetc0_revmii_mac::Enetc0RevmiiMac
- Delete:
from: enetc0_revmii_phy::Enetc0RevmiiPhy
- Delete:
from: ethernet_pll::EthernetPll
- Delete:
from: mu2_mua::Mu2Mua
- Delete:
from: mu_apps_s3mua::MuAppsS3mua
- Delete:
from: sw0_global::Sw0Global
- Delete:
from: tstmr2_tstmra::Tstmr2Tstmra
- Delete:
from: xcache_pc::XcachePc
- Delete:
from: m33_pcf::M33Pcf1
# Aliased cluster arrays are not supported by raltool at the time of writing.
- Delete:
from: ecat::RxErrorCntr
- Delete:
from: ecat::ForwardedRxErrorCntr
- Delete:
from: ecat::LostLinkCntr
- Delete:
from: ecat::Fmmu
- Delete:
from: ecat::Syncmanager
# This one probably just needs some renaming to work.
- Delete:
from: mu2_mub::Mu2Mub

# Settings for the combine pass.
combines:
Expand Down
Loading