Here are the details of my setup:
MCU: S32K148 144pin package
IDE: S32DS 3.6.6 running on Windows 11
Toolchain: gcc 10.2
RTD version 3.0.0
Driver model used: Non-Autosar
With regards to using the MCU pins as GPIO, I am confused about the role of the Pin tool and the Port peripheral. Are they both needed at the same time?
The gist of my problem is that, in autogenerated file board/Port_Ci_Port_Ip_Cfg.c, for my custom board, all the pins have
.direction = PORT_CI_PORT_PIN_IN
even when a pin is set as output in pin tool. Adding the same pin to the Port peripheral *does* identify the correct direction in the GUI screen (i.e. direction in Port peripheral matches what is configured in the Pin tool; there is no way to change this in the Port peripheral), but the 'Update Code' button is still shown in grey and clicking on it anyway does not make any difference to the generated code (i.e. it still shows the pin direction as INPUT).
To add to the confusion, this issue does not happen in some of the provided examples. I tried Port_Ci_Port_Ip_Example_S32K148 and the Port peripheral shows the pins configured as output (but all the pins in this example are output, so this may not be a good example to try)
To add to the confusion even more, I added a pin IN THE PIN TOOL to this example that is connected to an LED in my own board (not the EVK) WITHOUT ADDING THIS PIN TO THE PORT PERIPHERAL and I was able to blink this LED successfully. So why would one need to configure the Port peripheral.
To add to confusion yet more, I could not find any code matching the Port peripheral in the 'generated' subdirectory. When I added a new pin to the Port peripheral, the generated code, which is under git version control, did not show any changed files (that would correspond to this change)