Pwm_example_S32K148 build failed.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pwm_example_S32K148 build failed.

244 Views
iysheng
Contributor II

I installed DS32 version 3.4 and some needed package.

iysheng_0-1718541776746.png

iysheng_2-1718541822764.pngiysheng_3-1718541836574.png

And I create a project based on Pwm_example_S32K148.When I try to build the project I get some errors like this:

iysheng_4-1718541896443.png

 

 

Tags (1)
0 Kudos
Reply
2 Replies

215 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@iysheng

please click "update code" and then try it again.

Senlent_0-1718591141284.png

 

0 Kudos
Reply

196 Views
iysheng
Contributor II

After I do this ,when I build I get error messages as below:

```

make -j12 all
Building file: ../board/Port_Ci_Port_Ip_Cfg.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@board/Clock_Ip_Cfg.args" -MMD -MP -MF"board/Port_Ci_Port_Ip_Cfg.d" -MT"board/Port_Ci_Port_Ip_Cfg.o" -o "board/Port_Ci_Port_Ip_Cfg.o" "../board/Port_Ci_Port_Ip_Cfg.c"
../board/Port_Ci_Port_Ip_Cfg.c:29:60: error: 'NUM_OF_CONFIGURED_PINS0' undeclared here (not in a function); did you mean 'NUM_OF_CONFIGURED_PINS'?
29 | Port_Ci_Port_Ip_PinSettingsConfig g_pin_mux_InitConfigArr0[NUM_OF_CONFIGURED_PINS0] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
| NUM_OF_CONFIGURED_PINS
../board/Port_Ci_Port_Ip_Cfg.c:31:9: error: field name not in record or union initializer
31 | .portBase = IP_PORTC,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:31:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:32:9: error: field name not in record or union initializer
32 | .gpioBase = NULL_PTR,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:32:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:33:9: error: field name not in record or union initializer
33 | .pinPortIdx = 19U,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:33:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:34:9: error: field name not in record or union initializer
34 | .pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:34:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:35:9: error: field name not in record or union initializer
35 | .driveStrength = PORT_DRIVE_STRENGTH_LOW,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:35:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:36:9: error: field name not in record or union initializer
36 | .passiveFilter = (boolean)FALSE,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:36:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:37:9: error: field name not in record or union initializer
37 | .mux = PORT_MUX_ALT2,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:37:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:38:9: error: field name not in record or union initializer
38 | .lockRegister = PORT_LOCK_REGISTER_DISABLED,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:38:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
../board/Port_Ci_Port_Ip_Cfg.c:39:9: error: field name not in record or union initializer
39 | .digitalFilter = (boolean)FALSE,
| ^
../board/Port_Ci_Port_Ip_Cfg.c:39:9: note: (near initialization for 'g_pin_mux_InitConfigArr0')
make: *** [board/subdir.mk:26: board/Port_Ci_Port_Ip_Cfg.o] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.

```

 and the generated code releate is:

```

Port_Ci_Port_Ip_PinSettingsConfig g_pin_mux_InitConfigArr0[NUM_OF_CONFIGURED_PINS0] = {
{
.portBase = IP_PORTC,
.gpioBase = NULL_PTR,
.pinPortIdx = 19U,
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
.driveStrength = PORT_DRIVE_STRENGTH_LOW,
.passiveFilter = (boolean)FALSE,
.mux = PORT_MUX_ALT2,
.lockRegister = PORT_LOCK_REGISTER_DISABLED,
.digitalFilter = (boolean)FALSE,
},
};

```

I found macro NUM_OF_CONFIGURED_PINS define as

iysheng_0-1718629852941.png

 

0 Kudos
Reply