We'll try to run the PX4 firmware on the STM32F4Discovery board. Some documentation can be found here. We'll try to run everything from Linux.
First, we build the PX4 bootloader for f4discovery. There is a specific makefile target, make px4discovery_bl. To flash the bootloader, we can use texane stlink, which we will build. After installing it, we can run stlink-gui and download the bootloader through the mini USB port, detected as STMicroelectronics ST-LINK/V2.
Then we build the PX4 firmware with make px4-stm32f4discovery_default. We connect to the micro USB port; it is detected as PX4 BL DISCOVERY and /dev/ttyACM0 port is created. To flash, make px4-stm32f4discovery_default upload.
Connect a USB Serial adapter to PA3 (RX) and PA2 (TX), and run screen /dev/ttyUSB0 57600 to access NuttX terminal. The boot message,
sercon: Registering CDC/ACM serial driversercon: Successfully registered the CDC/ACM serial driverHW arch: PX4_STM32F4DISCOVERYFW git-hash: 7a82c777b28c49b3476be3da716984e6bdc987a9FW version: 7.82.77 0 (122834176)OS: NuttXOS version: Release 7.22.0 (118882559)OS git-hash: 63775322bf25adb406594f8e610122fe0cef2f7aBuild datetime: Jun 22 2018 22:25:57Build uri: BUILD_URIToolchain: GNU GCC, 4.9.3 20150529 (prerelease)MFGUID: 3138343532314719002e0034MCU: STM32F???, rev. ZUID: 2E0034:32314719:31383435nsh: mount: mount failed: No such file or directorynsh: tone_alarm: command not foundnsh: mkfatfs: mkfatfs failed: No such file or directorynsh: tone_alarm: command not foundnsh: tune_control: command not foundnsh: mtd: command not foundINFO [param] selected parameter default file /fs/microsd/paramsERROR [param] open '/fs/microsd/params' failed (2)nsh: rgbled: command not foundnsh: blinkm: command not foundnsh: rgbled_pwm: command not foundBAT_N_CELLS: curr: 0 -> new: 3ERROR [param] Parameter SYS_USE_IO not foundERROR [param] Parameter SYS_FMU_TASK not foundERROR [param] Parameter MNT_MODE_IN not foundERROR [param] Parameter MNT_MODE_OUT not foundnsh: dataman: command not foundnsh: gps: command not foundnsh: fmu: command not foundnsh: fmu: command not foundnsh: ms5611: command not foundnsh: ms5611: command not foundnsh: bst: command not foundnsh: adc: command not foundERROR [param] Parameter SENS_EN_LL40LS not foundERROR [param] Parameter SENS_EN_LL40LS not foundERROR [param] Parameter SENS_EN_SF0X not foundERROR [param] Parameter SENS_EN_SF1XX not foundERROR [param] Parameter SENS_EN_MB12XX not foundERROR [param] Parameter SENS_EN_TRANGER not foundERROR [param] Parameter SENS_EN_TFMINI not foundERROR [param] Parameter SENS_EN_LEDDAR1 not foundnsh: sensors: command not foundnsh: commander: command not foundnsh: send_event: command not foundnsh: load_mon: command not foundERROR [param] Parameter UAVCAN_ENABLE not foundERROR [param] Parameter SENS_EN_LL40LS not foundERROR [param] Parameter TRIG_MODE not foundnsh: fmu: command not foundnsh: tune_control: command not foundnsh: mavlink: command not foundnsh: mavlink: command not foundERROR [param] Parameter UAVCAN_ENABLE not foundnsh: mavlink: command not foundnsh: navigator: command not foundNo autostart ID foundnsh: ekf2: command not foundnsh: tone_alarm: command not foundERROR [param] Parameter MNT_MODE_IN not foundnsh: vmount: command not foundERROR [param] Parameter SDLOG_MODE not foundERROR [param] Parameter SDLOG_MODE not foundnsh: logger: command not foundnsh: mavlink: command not foundNuttShell (NSH)nsh> ERROR [parameters] failed to open param file: /fs/microsd/paramsERROR [parameters] param save failed (-1)nsh> helphelp usage: help [-v] [<cmd>][ dirname free mkrd rmdir umount? date help mh set unsetbasename dd hexdump mount sh usleepbreak df kill mv sleep xdcat echo ls mw testcd exec mb ps timecp exit mkdir pwd truecmp false mkfatfs rm unameBuiltin Apps:cubl_updateconfigmixernshtermparamperfpx4_simple_appreboottopuorbverserconserdisnsh> ver allHW arch: PX4_STM32F4DISCOVERYFW git-hash: 7a82c777b28c49b3476be3da716984e6bdc987a9FW version: 7.82.77 0 (122834176)OS: NuttXOS version: Release 7.22.0 (118882559)OS git-hash: 63775322bf25adb406594f8e610122fe0cef2f7aBuild datetime: Jun 22 2018 22:25:57Build uri: BUILD_URIToolchain: GNU GCC, 4.9.3 20150529 (prerelease)MFGUID: 3138343532314719002e0034MCU: STM32F???, rev. ZUID: 2E0034:32314719:31383435nsh>
No comments:
Post a Comment