File differences 1.Setting up Your Dev Environment

I wrote AI an e-mail about this.

Setting up a ThinkPad with dual boot Ubuntu Studio for development because, well is it even possible to do everything under Windows and why would you want to?

I followed the directions but where it said “gcc-arm-none-eabi-9-2019-q4-major” the file was different “gcc-arm-none-eabi-9-2020-q2-update” so I changed that in the .bashrc but when I /rebuild_libs.sh I get the error:

/bin/sh: 1: arm-none-eabi-g++: not found

Is this “…2020-q2-update” not a replacement for “…2019-q4-major” ?

We can update the docs to reflect the current version available. Thanks for letting us know.

The packages should be compatible. If you run echo $PATH do you see the directory you added in your bashrc?

Also, I’m away from my computer right now, but if it would be worth checking if the arm-none-eabi-* executables are in the root directory of the package or within a bin/ directory. If so, the PATH variable should be updated to point to that directory.

Hope that helps!

Well, it turns out there was a typo in the path, this has probably never happened to anyone ever.
Now it seems to run fine with all this output:

Blockquotejames@james-ThinkPad-T450:~/Desktop/DaisyExamples$ ./rebuild_libs.sh
/home/james/Desktop/DaisyExamples
rebuilding everything. . .
only errors, and warnings will output. . .


rebuilding libdaisy
src/per_qspi.c:658:16: warning: ‘get_status_register’ defined but not used [-Wunused-function]
658 | static uint8_t get_status_register(QSPI_HandleTypeDef *hqspi)
| ^~~~~~~~~~~~~~~~~~~
src/per_qspi.c:627:17: warning: ‘exit_quad_mode’ defined but not used [-Wunused-function]
627 | static uint32_t exit_quad_mode(QSPI_HandleTypeDef *hqspi)
| ^~~~~~~~~~~~~~
src/per_qspi.c:598:17: warning: ‘enter_quad_mode’ defined but not used [-Wunused-function]
598 | static uint32_t enter_quad_mode(QSPI_HandleTypeDef *hqspi)
| ^~~~~~~~~~~~~~~
src/per_sai.c: In function ‘HAL_SAI_MspInit’:
src/per_sai.c:312:34: warning: unused variable ‘pSyncConfig’ [-Wunused-variable]
312 | HAL_DMA_MuxSyncConfigTypeDef pSyncConfig;
| ^~~~~~~~~~~
src/hid_oled_display.cpp:89:21: warning: ‘cfg_dc’ defined but not used [-Wunused-variable]
89 | static dsy_gpio_pin cfg_dc = {DSY_GPIOB, 4};
| ^~~~~~
src/hid_oled_display.cpp:88:21: warning: ‘cfg_reset’ defined but not used [-Wunused-variable]
88 | static dsy_gpio_pin cfg_reset = {DSY_GPIOB, 15};
| ^~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c: In function ‘USB_WritePacket’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c:934:7: warning: ‘packed’ attribute ignored for type ‘uint32_t *’ {aka ‘long unsigned int *’} [-Wattributes]
934 | USBx_DFIFO((uint32_t)ch_ep_num) = *((__packed uint32_t *)pSrc);
| ^~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c: In function ‘USB_ReadPacket’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c:963:5: warning: ‘packed’ attribute ignored for type ‘uint32_t *’ {aka ‘long unsigned int *’} [-Wattributes]
963 | *(__packed uint32_t *)pDest = USBx_DFIFO(0U);
| ^
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c: In function ‘HAL_SPI_Transmit’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:885:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
885 | *((__IO uint16_t *)&hspi->Instance->TXDR) = *((uint16_t *)hspi->pTxBuffPtr);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:924:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
924 | *((__IO uint16_t *)&hspi->Instance->TXDR) = *((uint16_t *)hspi->pTxBuffPtr);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c: In function ‘HAL_SPI_Receive’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:1099:47: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
1099 | *((uint16_t *)hspi->pRxBuffPtr) = *((__IO uint16_t *)&hspi->Instance->RXDR);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:1139:47: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
1139 | *((uint16_t *)hspi->pRxBuffPtr) = *((__IO uint16_t *)&hspi->Instance->RXDR);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c: In function ‘HAL_SPI_TransmitReceive’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:1330:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
1330 | *((__IO uint16_t *)&hspi->Instance->TXDR) = *((uint16_t *)hspi->pTxBuffPtr);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:1349:47: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
1349 | *((uint16_t *)hspi->pRxBuffPtr) = *((__IO uint16_t *)&hspi->Instance->RXDR);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:1388:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
1388 | *((__IO uint16_t *)&hspi->Instance->TXDR) = *((uint16_t *)hspi->pTxBuffPtr);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:1414:47: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
1414 | *((uint16_t *)hspi->pRxBuffPtr) = *((__IO uint16_t *)&hspi->Instance->RXDR);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c: In function ‘HAL_SPI_IRQHandler’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:2786:49: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2786 | *((uint16_t *)hspi->pRxBuffPtr) = *((__IO uint16_t *)&hspi->Instance->RXDR);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c: In function ‘SPI_RxISR_16BIT’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:3434:39: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
3434 | *((uint16_t )hspi->pRxBuffPtr) = ((__IO uint16_t *)&hspi->Instance->RXDR);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c: In function ‘SPI_TxISR_16BIT’:
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c:3544:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
3544 | *((__IO uint16_t *)&hspi->Instance->TXDR) = *((uint16_t *)hspi->pTxBuffPtr);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
done building libdaisy
rebuilding DaisySP
done building daisySP
done building libs
james@james-ThinkPad-T450:~/Desktop/DaisyExamples$

Was able to make the Blink and the led is in fact blinking. Hooray!

How does one shut down the Daisy in order to unplug it safely?
Also is there any aspect of the -dfu that needs to happen to return the USB port to “normal”.

muchos gracias amigo!

  • PJ

Awesome!

Those warnings were recently fixed, and should be live on the latest version of the repo. With the recommended toolchain there should be 0 warnings and errors for the entire rebuild_all.sh script.

Re shutting down: There isn’t anything special. It’s not running an operating system or anything that needs to be shutdown in a specific order. You’re free to yank the USB when you’re done :slight_smile:

As for usb port, the chip automatically configures the port for DFU when entering the bootloader, and deinitializes everything before jumping to whatever program you flash onto the device. So the USB port will immediately become ‘normal’ or whatever you have your program configured to use it for.

By default the USB isn’t used, but can be added used via the UsbHandle class. Currently only CDC mode is supported, but we’ll be adding MIDI, Audio, HID, etc. class support pretty soon.

Thanks for your kind assistance, I’m getting psyched up for this.
I’ll need to learn how to work with the repo as I haven’t done things this way before.
Don’t want to fry my Daisy now that everything looks to be working (I’m sure you tested it).

I should have made it more clear, I was wondering about the USB in my ThinkPad, not the one in Daisy.
Some things will ‘take control’ of the laptop’s USB and not let it go.

yours - PJ