La plataforma NXP MCUXpresso Experiencia de Desarrollo MCXN947 (Parte 4)

Aqui mostraremos como se utiliza Zephyr en la plataforma NXP MCUXpresso Experiencia de Desarrollo MCXN947

Primero se procede a instalar Zephyr como se muestra en el articulo anterior. Proceda a construir el demo de Zephyr de sincronizacion como sigue desde el ambiente virtual,


(venv) DigiKey_Coffee_Cup # /zephyrproject/zephyr$ west build -b frdm_mcxn947/mcxn947/cpu0 samples/philosophers

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
...
...

[171/171] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       31132 B         2 MB      1.48%
             RAM:       18072 B       320 KB      5.52%
           SRAMX:           0 B        96 KB      0.00%
        IDT_LIST:           0 B        32 KB      0.00%

Finalmente programelo como sigue,

(venv) DigiKey_Coffee_Cup # zephyrproject/zephyr$ west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner linkserver
RUNNER - gdb_port = 3333, semih port = 8888
LinkServer: /usr/local/LinkServer/LinkServer, version v26.6.137
INFO: Exact match for MCXN947:FRDM-MCXN947 found
INFO: Selected device MCXN947:FRDM-MCXN947
INFO: Selected probe #1 MB52CKWLSWQZA (MCU-LINK FRDM-MCXN947 (r0E7) CMSIS-DAP V3.172)
INFO: MCU-Link firmware update `check`: Probe ([MB52CKWLSWQZA] [MCU-LINK FRDM-MCXN947 (r0E7) CMSIS-DAP V3.172]) is already running the same firmware version as the included firmware version [3.172]
INFO: Selected device matches probe's target identification info

...
...

En un terminal de minicom observara como los 5 filosofos participando,

Welcome to minicom 2.10

OPTIONS: I18n 
Port /dev/ttyACM0, 10:18:59 [U]

Press CTRL-A Z for help on special keys

Philosopher 0 [P: 3]        STARVING       
Philosopher 1 [P: 2]    HOLDING ONE FORK   
Philosopher 2 [P: 1]  THINKING [  400 ms ] 
Philosopher 3 [P: 0]   EATING  [  525 ms ] 
Philosopher 4 [C:-1]  THINKING [  275 ms ] 
Philosopher 5 [C:-2]   EATING  [  475 ms ] 
...

Hemos concluido con este demo de los filosofos de ciencias de computacion en Zephyr en esta plataforma de NXP. La plataforma bien conocida NXP MCUXpresso Experiencia de Desarrollo MCXN947 es de bajo costo pero tiene muchas aplicaciones en diversas areas, y está disponible en DigiKey. Mantenganse sintonizado para nuestro próximo artículo.

Que tenga un buen día!

1 Like