Hello,
I am trying to set up a basic LED blink example using RTD AUTOSAR (MCAL) on an S32K144 LQFP100 with S32DS 3.6.7. I have configured PTC11 as a GPIO output in the Pins tool (.mex file), and added both Dio and Port components in the Peripherals/MCAL view.
However, when I click 'Update Code', the code generation fails with the following errors:
- [CODEGEN] Failed to generate file 'Port_Ci_Port_Ip_PBcfg.c'
- TypeError: PinMode.match is not a function
at GetPDO_IP (:187)
- [CODEGEN] Failed to generate file 'Port_PBcfg.c'
at GetPDO (port_utils.js:235)
My setup:
- Board: S32K144 LQFP100
- S32DS version: 3.6.7
- RTD / PlatformSDK_S32K1_S32M24
- Pin: PTC11 configured as PORTC:port_11, Output, GPIO
- MCAL components added: Dio + Port (both in AUTOSAR Mode)
In the Port MCAL configuration, the PortPin_0 fields 'PortPin Direction' and 'PortPin Mode' appear greyed out and show numeric values (0) instead of strings. I suspect the code generator expects a string value like 'ALT1' for PinMode but receives a number instead.
Has anyone encountered this issue? Is the PortPin configuration supposed to be fully auto-generated from the .mex, or do I need to configure it manually? Any guidance would be greatly appreciated.
Additionally, since I am new to RTD AUTOSAR, I would love to know if there are any recommended resources to learn the stack from scratch — tutorials, example projects, videos or any suggested order to learn the MCAL modules (Port, Dio, Adc, Pwm, Can...). I have experience with bare-metal embedded C but I am new to AUTOSAR.
Any guidance would be greatly appreciated.
Thank you!
I am still trying. I removed the Port library from Drivers, but it still doesn’t work.
The PortPinMode is set to 0, while in the example and in the code you sent me it is set to GPIO. I’m not sure how to change that.
I’m also a bit confused about the workflow. As I understand it:
Hi@antonio_esal
I did find some errors when I opened the example program you created. Attached is the example program I created for your reference.
In your project, you don't need to add the "Port" module to both MCAL and Drivers simultaneously.
Hi@antonio_esal
You can refer to the example code included in the RTD driver package to start learning.