I am developing models to be implemented onto a S32K148 uC and so far using the EVB dev kit it works well programming through Simulink.
My question is: Is it possible to build Simulink code and then flash the code over CAN using a bootloader? If so is this functionality already provided? I saw RAppID but it doesn't seem to support this device.
Thank you in advance, appreciate the help!
I saw on some posts that RAppID workd with s32k148 when you flash the .rbf that is included: "S32K148_S32DS_UART1_CAN0.rbf". I have put this onto my board with S32DS but when trying to do anything with RAppID it shows an error:
Vector kit has been added:
Where am I going wrong with this? I appreciate any help!
Also once working is it possible to set something like a device ID? so if I have for example 3 S32K148 board connected to the same CAN bus can I select which one I want to program? Thanks in advance!
Hi @Poley ,
The settings you are using seem to be right. Please also try checking the "AutoRead File" Option in the RappID bootloader utility.
Make sure that the evaluation board is externally powered up with 12V because otherwise, the CAN transceiver will not work. The procedure is like this. You have to reset the board from the button and within 5 seconds you have to press the Start bootloader button.
Unfortunately, I don't have the proper tools right now to give it a try on my side. Keep me updated, and if this is not working I will try to contact the RAppId bootloader team.
Changing to auto-read does fix the CAN error, thank you.
The issue now is that the application does not work once flashed. I have it working when downloading straight from Simulink to board.
RAppID lets me click "Start Boot Loader" even when I haven't reset the board (Which is the first red flag I noticed). The APP progress them goes to 100% and completes but nothing happens on the board.
Is this because RAppID is looking for S32K144 rather than S32K148?
I would greatly appreciate help from the RAppID team to get this bootloader working for S32K148. I would also like to know if there is a way of selecting which board to program. My plan is to have a few S32K148 boards on the same CAN bus and want to be able to flash each of them whilst connected together.
Lasty, what application file should I be flashing? I have been trying the .mot that is in my Simulink build folder, is that right?
Thank you I really appreciate the help!
I will send a question to the RAppId bootloader team for the addressing issue that you are mentioning.
For the board not booting into the sent application, Can you please check in your model that the Download interface is selected for "Serial". By selecting this option, the generated mot file uses another linker file and this is the one that has to be sent over the RAppId Bootloader app. Can just for testing purposes try as well downloading over serial (not over CAN, directly from our toolbox) to see if the generated mots file boots up once the Download Interface is serial?
Hope this helps,
I can successfully (Program runs on board) download over serial using these settings:
So maybe something wrong with the linker? I also could have programmed the .rbf incorrectly as well as a guess
Also, how do I know if I have 192 or 256KB SRAM?
Hello @Poley ,
Let's give it a try with another linker file. I hope this will solve the not booting for the code sent over CAN.
1. Please type the following command in Matlab:
2. In the newly opened window file please replace (please back up the existing files first!) the attached linker files.
Then give it a try by sending the code over CAN using the RAppID bootloader.
Thank you for your reply!
Unfortunately this does the same thing. Allows me to flash but not application code is running on the board once the download has completed. It also still allow me to "flash" the .mot even without pressing reset first which also to me shows that there is an issue.
Could this be me flashing the .rbf file onto the board incorrectly or would it not flash at all if I haven't done it properly?
I have noticed that the 192 version only shows up in linker options even with 256 selected as SRAM. How do I know whether I need the 192 or 256 linker file? And if it's 256, how do I get it to select that one as only 192 shows in linker list. Here is my config box:
Also, I seems to get an issue where I can only build once in Simulink, if I try and build again I get the following error in the diagnostic box, is this something you have seen before?
Thank you very much for the help!
Just to add onto this I am now getting these errors when trying to build:
Do you have any idea why this would have just randomly started happening? Or the permission denied error before. It's not something silly like my Simulink version is it? Currently using 2020b.
Still no where with the CAN bootloader.
Thank you for the help!