FX30 with (WP77xx) with Talon mangOH CAN interface

you can install the toolchain which is in this path
owner@ubuntu:~/leaf/leaf-data/wp77$ ls /home/owner/leaf/leaf-data/wp77/wp77-toolchain
environment-setup-armv7a-neon-poky-linux-gnueabi
manifest.json
site-config-armv7a-neon-poky-linux-gnueabi
sysroots
toolChainExtractor.sh
version-armv7a-neon-poky-linux-gnueabi

And the usual legato framework will be in this path:
/home/owner/leaf/leaf-data/wp77/fx30-catm-legato

So now you have the toolchain, legato framework, and your mangoh source for your compilation.

so to install this toolchain:
poky-swi-ext-glibc-x86_64-meta-toolchain-swi-armv7a-neon-toolchain-swi-SWI9X06Y_02.32.02.00.sh
in this folder which I have created
~/leaf/leaf-data/wp77

then to setup the leaf on this folder:
~/leaf/leaf-data/wp77$ leaf setup FX30 -p swi-fx30-catm_1.0.0

and then at this point I move the folder where my system is here and compile again…?
Can I ask what is going to be the difference?
If I am using the same toolchain??

I think you got the wrong toolchain version.
The toolchain for swi-fx30-catm_1.00 should be wp77-toolchain_SWI9X06Y_02.18.05.00-linux64.

owner@ubuntu:~/leaf/leaf-data/wp77$ ls
fx30-catm-image fx30-catm-linux-image swi-vscode-support
fx30-catm-legato swi-fx30-catm wp77-modem-image
fx30-catm-legato-image swi-legato wp77-toolchain
owner@ubuntu:~/leaf/leaf-data/wp77$ ls ./wp77-toolchain
environment-setup-armv7a-neon-poky-linux-gnueabi
manifest.json
site-config-armv7a-neon-poky-linux-gnueabi
sysroots
toolChainExtractor.sh
version-armv7a-neon-poky-linux-gnueabi
owner@ubuntu:~/leaf/leaf-data/wp77$ ls ./wp77-toolchain -l
lrwxrwxrwx 1 owner owner 61 Aug 20 12:08 ./wp77-toolchain → /home/owner/.leaf/wp77-toolchain_SWI9X06Y_02.18.05.00-linux64

Hi there,
You need to build the kernel and the module using the same toolchain. The simplest is to rebuild the FX30 yocto image with canbus enabled.

To do this pull the swi-fx30-catm_1.0.0 leaf identifier to get the R9.1 source code.

The stock WP77 code will run on an FX30 but peripheral functions won’t work.

If you’re able to wait another week or 2, the R11 release is just about ready.

BR,
Chris

Hi Chris,

How to get the fx30 yocto source code by leaf?
Here is what i got from swi-fx30-catm_1.0.0 identifier:

owner@ubuntu:~/leaf/leaf-data/wp77$ ls
fx30-catm-image fx30-catm-linux-image swi-vscode-support
fx30-catm-legato swi-fx30-catm wp77-modem-image
fx30-catm-legato-image swi-legato wp77-toolchain

Hi @jyijyi,
Just execute this command:

leaf getsrc swi-linux

Leaf will pull the entire yocto workspace using repo. You’ll need to setup SSH keys on gerrit.legato.io

The R11 source will be available with identifier: swi-fx30-catm_2.0.0

BR,
Chris

Hi Chris,
Thx for the information, I will try later.

Hi Chris,
it seems I will need to rebuild the image of my fx30 to implement the CAN drivers and also to update the GLIBC of my target device.
I am trying to download the source from gerrit but it seems it fails due to public-key ack:

XXXXX@XXXXX.com.au@gerrit.legato.io: Permission denied (publickey).
fatal: Could not read from remote repository.

How do I implement the ssh publickey? Do I need to generate one on gerrit and to store it locally to my machine (~/.ssh) or the other way around? Because on gerrit I can`t do either things…

Hi Claudio,
You’ll need to register at gerrit.legato.io and then add your public key under your profile settings.

You can generate a private/public key pair using ssh-keygen.

BR,
Chris

Hi @cchenry ,

I have the same issue and get stuck.
Can you help to give us a step by step on how to pass through those pubic key problem?

I have tried
ssh-keygen -t rsa -b 2048 -C “xxx@xxxxxx.com

and then " cat /home/owner/.ssh/id_rsa.pub "
copy the value to “https://gerrit.legato.io/settings/#SSHKeys

Still I saw the following:


Proceed? (Y/n)
Y
Checking credentials…
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR:
Something went wrong when trying to connect to ssh://xxx@xxxxxx.com@gerrit.legato.io:29418/manifest


Hi @jyijyi,
Have you added your git info?
git config --global user.name “FIRST LAST”
git config --global user.email “your_email@xxx.com
BR,
Chris

Hi @cchenry,
Thanks for your help.
Finally I can download the source code by the steps below:

  1. ssh-keygen -t rsa -b 2048 -C “xxx@xxx.com

  2. cat /home/owner/.ssh/id_rsa.pub

  3. copy the value to “https://gerrit.legato.io/settings/#SSHKeys
    set the username to “xxx” in https://gerrit.legato.io/settings/#Profile ( this can only set once)

  4. sudo chmod 400 /home/owner/.ssh/id_rsa

  5. ssh-add /home/owner/.ssh/id_rsa
    Enter passphrase for /home/owner/.ssh/id_rsa:

sudo chmod 700 ~/.ssh/
sudo chmod 600 ~/.ssh/*
sudo chown -R owner ~/.ssh/
sudo chgrp -R owner ~/.ssh/

(where owner is the user name of my PC)

  1. in VScode, choose the profile you needed:
    leaf shell
    leaf env user --set GERRIT_USER=“xxx”
    leaf getsrc swi-linux
2 Likes

I have setup the leaf with the latest release for the FX30S, is there any different way to build an open the CAN interface on the target from what I have done earlier?
I have, once again, compile my project and deployed to the target and then run the start.can.sh script, still get an error from the kernel when trying to load the can driver:

root@fx30s:~# ./start_can.sh
“./start_can.sh board [slot]” where board is “green” or “red” or “yellow” and slot is “0” or “1”
root@fx30s:~# ./start_can.sh red 0
Unload of module can_iot.ko has been successful.
sh: write error: Device or resource busy
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_Create() 3259 | Creating app ‘tools’
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_Start() 3472 | Starting app ‘tools’
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_secstore.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_cm.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComponen
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_moduleLoad.so’ to '/legato/systems/current/appsWriteable/tools/lib/lib
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_fwupdate.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_pmtool.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode_default.so’ to '/legato/systems/current/appsWriteable/t
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_gnss.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCompon
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/cm’ to ‘/legato/systems/current/appsWriteable/tools/bin/cm’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/gnss’ to ‘/legato/systems/current/appsWriteable/tools/bin/gnss’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/kmod’ to ‘/legato/systems/current/appsWriteable/tools/bin/kmod’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/fwupdate’ to ‘/legato/systems/current/appsWriteable/tools/bin/fwupdate’: Already ex
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/secstore’ to ‘/legato/systems/current/appsWriteable/tools/bin/secstore’: Already ex
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/uartMode’ to ‘/legato/systems/current/appsWriteable/tools/bin/uartMode’: Already ex
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/pmtool’ to ‘/legato/systems/current/appsWriteable/tools/bin/pmtool’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/scripts/cm’ to ‘/legato/systems/current/appsWriteable/tools/scripts/cm’: Already exists
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘kmod@0’ with pid 3850
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | supervisor.c SigChildHandler() 874 | Reaping unconfigured child process 3849.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘bin/kmod’
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 8192.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 90112.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[3850]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Oct 2 09:05:44 fx30s user.warn Legato: -WRN- | UNKNOWN[3850]/framework T=main | safeRef.c InitMap() 217 | Map name ‘refle_kernelModule_ClientHandlers’ truncated to ‘refle_kernelModule_ClientHandle’.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Unload() 1784 | Requested to unload module ‘can_iot.ko’.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Unload() 1826 | Unloading module, ‘can_iot.ko’, was successful.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process ‘kmod@0’ (PID: 3850) has exited with exit code 0.
Oct 2 09:05:44 fx30s user.info kernel: [ 1153.224824] gpio_set_map_table: Detected FX30S
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224851] gpio_sync_ri: RI owner is Modem
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224865] gpio_map_name_to_num: find GPIO 76
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224874] export_store: Export GPIO: 76
Oct 2 09:05:44 fx30s user.info kernel: [ 1153.224899] gpio_set_map_table: Detected FX30S
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224909] gpio_sync_ri: RI owner is Modem
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.224923] gpiod_export: sierra–find GPIO,chipdev = -828222960,chipngpio = 80,chipbase = 0
Oct 2 09:05:44 fx30s user.info kernel: [ 1153.225663] gpio_set_map_table: Detected FX30S
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225682] gpio_sync_ri: RI owner is Modem
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225693] gpio_map_name_to_num: find GPIO 38
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225702] export_store: Export GPIO: 38
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225714] gpio-38 (sysfs): gpiod_request: status -16
Oct 2 09:05:44 fx30s user.debug kernel: [ 1153.225723] export_store: Status -16
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_StopComplete() 4764 | app ‘tools’ has stopped.
Oct 2 09:05:44 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘tools’ has stopped.
Could not load the required module, can_iot.ko. (LE_FAULT)
See the device log for details.
Cannot find device “can0”
ifconfig: SIOCGIFFLAGS: No such device
root@fx30s:~# Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_Start() 3472 | Starting app ‘tools’
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_secstore.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_cm.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComponen
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_moduleLoad.so’ to '/legato/systems/current/appsWriteable/tools/lib/lib
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_fwupdate.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCo
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_pmtool.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode_default.so’ to '/legato/systems/current/appsWriteable/t
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_gnss.so’ to '/legato/systems/current/appsWriteable/tools/lib/libCompon
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/cm’ to ‘/legato/systems/current/appsWriteable/tools/bin/cm’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/gnss’ to ‘/legato/systems/current/appsWriteable/tools/bin/gnss’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/kmod’ to ‘/legato/systems/current/appsWriteable/tools/bin/kmod’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/fwupdate’ to ‘/legato/systems/current/appsWriteable/tools/bin/fwupdate’: Already ex
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/secstore’ to ‘/legato/systems/current/appsWriteable/tools/bin/secstore’: Already ex
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/uartMode’ to ‘/legato/systems/current/appsWriteable/tools/bin/uartMode’: Already ex
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/bin/pmtool’ to ‘/legato/systems/current/appsWriteable/tools/bin/pmtool’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_swiQmi.so’ to '/legato/systems/current/appsWriteable/tools/lib/libComp
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/lib/libComponent_le_pa_uartMode.so’ to '/legato/systems/current/appsWriteable/tools/lib
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c CreateFileLink() 2085 | Skipping file link ‘/legato/systems/current/apps/tools/read-only/scripts/cm’ to ‘/legato/systems/current/appsWriteable/tools/scripts/cm’: Already exists
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_Start() 1403 | Starting process ‘kmod@0’ with pid 3861
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | supervisor.c SigChildHandler() 874 | Reaping unconfigured child process 3860.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | proc.c proc_Start() 1363 | Execing ‘bin/kmod’
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxCoreDumpFileBytes to value 8192.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileBytes to value 90112.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxLockedMemoryBytes to value 8192.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxFileDescriptors to value 256.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxMQueueBytes to value 512.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxThreads to value 20.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[3861]/supervisor T=main | resourceLimits.c SetRLimitValue() 301 | Setting resource limit maxQueuedSignals to value 100.
Oct 2 09:05:45 fx30s user.warn Legato: -WRN- | UNKNOWN[3861]/framework T=main | safeRef.c InitMap() 217 | Map name ‘refle_kernelModule_ClientHandlers’ truncated to ‘refle_kernelModule_ClientHandle’.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1720 | Requested to load module ‘can_iot.ko’.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | kernelModules.c ExecuteCommand() 244 | Execute '/sbin/insmod /legato/systems/current/modules/can_iot.ko ’
Oct 2 09:05:45 fx30s user.crit Legato: CRT | supervisor[1421]/supervisor T=main | kernelModules.c ExecuteCommand() 295 | /sbin/insmod /legato/systems/current/modules/can_iot.ko exited with error code 8.
Oct 2 09:05:45 fx30s user.err Legato: =ERR= | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1758 | Load module, ‘can_iot.ko’, failed. (LE_FAULT)
Oct 2 09:05:45 fx30s user.err kernel: [ 1154.367995] can_iot: version magic '3.18.140 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod_unload ARMv7 p2v8 ’
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | proc.c proc_SigChildHandler() 2079 | Process ‘kmod@0’ (PID: 3861) has exited with exit code 1.
Oct 2 09:05:45 fx30s user.warn Legato: -WRN- | supervisor[1421]/supervisor T=main | app.c app_SigChildHandler() 4067 | Process ‘kmod@0’ in app ‘tools’ faulted: Ignored.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | app.c app_StopComplete() 4764 | app ‘tools’ has stopped.
Oct 2 09:05:45 fx30s user.info Legato: INFO | supervisor[1421]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘tools’ has stopped.

ExecuteCommand() 295 | /sbin/insmod /legato/systems/current/modules/can_iot.ko exited with error code 8.
Oct 2 09:05:45 fx30s user.err Legato: =ERR= | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1758 | Load module, ‘can_iot.ko’, failed. (LE_FAULT)
Oct 2 09:05:45 fx30s user.err kernel: [ 1154.367995] can_iot: version magic '3.18.140 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod_unload ARMv7 p2v8 ’

Same problem with kernel version.
Have you tried the swi-fx30-catm_1.0.0 package?

I did start with that version, I was told to wait for the new release and that was going to fix all problems. @cchenry could u please explain it a bit because this is holding back all our projects and now we have lost a whole month.

It worth to make a try on swi-fx30-catm_1.0.0

Hi Claudio,
Could you please explain how you built your can_iot kernel object? Your log doesn’t show a magic number issue, but I wonder if you’ve built it separately from the kernel.

Are you using the prebuilt R11.0.0.007 kernel image?

Could you please try pulling the yocto source code:
leaf getsrc swi-linux

Add your kernel driver to the yocto kernel. You may also need to enable the CAN options as well. Then you can build the full image including the kernel:
cd swi-linux
make

The resulting image will be in:
build_bin/images/public

Alternately, the Legato framework supports installing a kernel object via a Legato application. I’m not familiar with the exact process, but there should be documentation on legato.io

BR,
Chris

@cchenry, I am actually using the legato framework for that, the only reference I have found was this:

…the system definition link is broken.

The system definition I am using is this one:

#include “$LEGATO_ROOT/default.sdef”
apps:
{
}
appSearch:
{
}
interfaceSearch:
{
}
moduleSearch:
{
/home/claudio/legatoWorkspace/legatoAF/drivers/mangoh/can_common
/home/claudio/legatoWorkspace/legatoAF/drivers/mangoh/can_9x07
}
kernelModules:
{
mcp251x.mdef
can_iot.mdef
}

This compiles fine and I can download to the target, then I locally run the start.sh script (assuming the target is for RED as the wp77 - FX30 should be)…
root@fx30s:~# ./start_can.sh red 0
Unload of module can_iot.ko has been successful.
sh: write error: Device or resource busy
Could not load the required module, can_iot.ko. (LE_FAULT)
See the device log for details.
Cannot find device “can0”
ifconfig: SIOCGIFFLAGS: No such device

This happens either with interfaces 0 or 1.

ExecuteCommand() 295 | /sbin/insmod /legato/systems/current/modules/can_iot.ko exited with error code 8.
Oct 2 09:05:45 fx30s user.err Legato: =ERR= | supervisor[1421]/supervisor T=main | kernelModules.c le_kernelModule_Load() 1758 | Load module, ‘can_iot.ko’, failed. (LE_FAULT)
Oct 2 09:05:45 fx30s user.err kernel: [ 1154.367995] can_iot: version magic '3.18.140 preempt mod_unload ARMv7 p2v8 ’ should be '3.18.44 preempt mod_unload ARMv7 p2v8 ’

Same problem with kernel version.
Have you tried the swi-fx30-catm_1.0.0 package?

We have started with the package and were told to wait for the new release as the

The stock WP77 code will run on an FX30 but peripheral functions won’t work.

Now I see that I am working on leaf shell, you are working on VScode and cchenry is talking about toolchain and system rebuild.
I did actually try with exact the same system definition and using the swi-fx30-catm_1.0.0, which didn`t work.

Is the CAN drive enabled on the R11 and how do I get it operational…?
If you’re able to wait another week or 2, the R11 release is just about ready.