Good morning,
I am new with embedded linux and SoM world in general, I probably do not have enough background to understand properly what I am trying to do.
As an experiment, I would like to enable CAN bus on my module imx7 colibri mounted on iris v2.0, from “How to Use CAN on TorizonCore” I understand that this device does not have a CAN transceiver, so I am gonna add an external transcriver.
But the problem that I am facing is that I do not properly understand how Device tree overlay works with Torizon, it seems to be too over-complicated and poorly explained in details, the tutorials just give some little examples but they are not enough to really understand in deep what is going on with all the tools provided (in my opinion).
What I did so far is creating a device tree overlay as explained in “CAN (Linux) | Toradex Developer Center” .dts that contains:
/dts-v1/;
/plugin/;
/ {
compatible = "toradex,colibri-imx7d",
"toradex,colibri-imx7s";
};
&flexcan1 {
status = "okay";
};
&iomuxc {
pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 &pinctrl_gpio5>;
};
and upload it with my host machine using:
torizoncore-builder dto deploy --remote-host 192.168.1.33 --remote-username torizon --remote-password <password> --force --reboot device-trees/overlays/imx7_canbus.dts
This runs and performs without any error the compilation and deploy the “ostree” on the device, but then the device does not boot and after 3 failed boot it rollback to the older version and starts.
Next I tried the solution proposed by this kind user " How to enable flexcan1 and flexcan2 on colibri imx7? - Technical Support - Toradex Community ", making an overlay with:
/dts-v1/;
/plugin/;
/ {
compatible = "toradex,colibri-imx7d",
"toradex,colibri-imx7s";
};
&flexcan1 {
status = "okay";
};
&iomuxc {
pinctrl_gpio7: gpio7-grp { /* Alternatively CAN1 */
fsl,pins = <
>;
};
pinctrl_flexcan1: flexcan1-grp {
fsl,pins = <
MX7D_PAD_ENET1_RGMII_RD3__FLEXCAN1_TX 0x59 /* SODIMM 55 */
MX7D_PAD_ENET1_RGMII_RD2__FLEXCAN1_RX 0x59 /* SODIMM 63 */
>;
};
};
But once I load this, the error is:
Downloading image from: https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/dunfell-5.x.y/release/1/colibri-imx7-emmc/torizon-upstream/torizon-core-docker/oedeploy/torizon-core-docker-colibri-imx7-emmc-Tezi_5.1.0+build.1.tar
The download may take some time. Please wait...
Download Complete!
Unpacking Toradex Easy Installer image.
Copying Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision 423f8b8c528c61d7846fdee6e9bfb9505246ac2843493a397391681b2b44666d from local repository...
0 metadata, 0 content objects imported; 0 bytes content written
Unpacked OSTree from Toradex Easy Installer image:
Commit checksum: 423f8b8c528c61d7846fdee6e9bfb9505246ac2843493a397391681b2b44666d
TorizonCore Version: 5.1.0+build.1
'device-trees' directory already exists
Error: device-trees/overlays/colibri-imx7_canbus.dts:25.4-5 syntax error
FATAL ERROR: Unable to parse input tree
error: cannot apply device-trees/overlays/colibri-imx7_canbus.dts.
What I am missing?
Where I can find some good explanation of what is going on without spending years reversing some code?