This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to create a custom board file for the nRF9160

I am trying to create a custom board file in the ncs/zepher/boards directory for our nRF9160.

If I copy the nrf9160_pca10090 directory to a new nam eg. nrf9160_newboard it will compile and run just fine.

Then when i change the name of the files to nrf9160_newboard and change the references in each of the files to correspond to the new file names.

I was able to get the hello world example to compile and run as a nrf9160_newboard, but when I tried to compile as nrf9160_newboardns I get the following errors in spm.c

1> C:/ncs/nrf/subsys/spm/spm.c:129:2: error: 'NRF_SPU' undeclared (first use in this function); did you mean 'NRF_SPU_S'?
1> C:/ncs/nrf/subsys/spm/spm.c:129:2: note: each undeclared identifier is reported only once for each function it appears in
1> C:/ncs/nrf/subsys/spm/spm.c:160:3: error: 'NRF_SPU' undeclared (first use in this function); did you mean 'NRF_SPU_S'?
1> C:/ncs/nrf/subsys/spm/spm.c:207:3: error: 'NRF_SPU' undeclared (first use in this function); did you mean 'NRF_SPU_S'?
1> C:/ncs/nrf/subsys/spm/spm.c:224:21: error: 'NRF_SPU' undeclared (first use in this function); did you mean 'NRF_SPU_S'?
1> C:/ncs/nrf/subsys/spm/spm.c:262:3: error: 'NRF_SPU' undeclared (first use in this function); did you mean 'NRF_SPU_S'?
1> C:/ncs/nrf/subsys/spm/spm.c:293:24: error: 'NRF_UARTE2' undeclared (first use in this function); did you mean 'NRF_UARTE0'?
1> C:/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
1> C:/ncs/nrf/subsys/spm/spm.c:293:3: note: in expansion of macro 'PERIPH'
1> C:/ncs/nrf/subsys/spm/spm.c:301:22: error: 'NRF_PWM1' undeclared (first use in this function); did you mean 'NRF_PWM0'?
1> C:/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
1> C:/ncs/nrf/subsys/spm/spm.c:301:3: note: in expansion of macro 'PERIPH'
1> C:/ncs/nrf/subsys/spm/spm.c:302:22: error: 'NRF_PWM2' undeclared (first use in this function); did you mean 'NRF_PWM1'?
1> C:/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
1> C:/ncs/nrf/subsys/spm/spm.c:302:3: note: in expansion of macro 'PERIPH'
1> C:/ncs/nrf/subsys/spm/spm.c:303:22: error: 'NRF_PWM3' undeclared (first use in this function); did you mean 'NRF_PWM2'?
1> C:/ncs/nrf/subsys/spm/spm.c:93:23: note: in definition of macro 'NRFX_PERIPHERAL_ID_GET'
1> C:/ncs/nrf/subsys/spm/spm.c:303:3: note: in expansion of macro 'PERIPH'
1> C:/ncs/nrf/subsys/spm/spm.c:321:3: error: 'NRF_SPU' undeclared (first use in this function); did you mean 'NRF_SPU_S'?
1> C:/ncs/nrf/subsys/spm/spm.c:321:10: error: 'const struct periph_cfg' has no member named 'GPIOPORT'
1> C:/ncs/nrf/subsys/spm/spm.c:321:23: error: 'const struct periph_cfg' has no member named 'PERM'
1> C:/ncs/nrf/subsys/spm/spm.c:321:3: warning: statement with no effect [-Wunused-value]
Build failed

i tried this using a grep replace function for 10090 on the new directory since I though I may have missed a line somewhere.

Is there a tutorial or set of directions on how to create new boards other than the one in Zephyr.

(Note: I did this before the introduction of the secure and non-secure versions of the board for section placement)

Parents Reply Children
No Data
Related