Open brentpicasso opened 10 years ago
Hi,
stm firmware is the most likely reason for failures. I should reflect this in README, but I haven't had much time for uubt lately. I will probably try to compile/run it with the recent stm firmware sometime, but I'm not sure it's easy, given the number of bugs (see my usb patch) and my failure to submit the patch to ST.
In the meanwhile your best approach is getting the old version of stm usb (and probably stdperiph) libraries. It's hard to name the exact versions, but I'm sure it's dated summer or fall 2011.
Successful application of my usb patch was essential for me to make uubt work.
On Thu, Nov 07, 2013 at 11:40:29PM -0800, brentpicasso wrote:
Hello,
I am trying to compile on Linux- I have downloaded the btstack and stm32f4-discovery firmware, updated the Makefile to point to these sub directories, and copied in what I believe was an appropriate flash linker script.
I am seeing the following make error. I'm thinking perhaps you used a older version of the STM32F4-discovery firmware? I have also noticed the patch you supplied failed to apply for me, I will be looking into manually patching as well.
I have also uploaded a copy of the uubt code in the current state I'm testing, so you can reproduce, here: http://dropcanvas.com/1zw07
Thank you so much for creating this code, it will help immensely with our open source project.
[brent@ubuntu src]$ make arm-none-eabi-gcc -g -O0 -mlittle-endian -mthumb -mcpu=cortex-m4 -ffreestanding -nostdlib -DUSE_STDPERIPH_DRIVER=1 -DSTM32F4XX=1 -DUSE_USB_OTG_FS=1 -Wl,-T,./clones/stm32_flash.ld -I. -I./conf -I./clones -I./dummy -Ibtstack/include -Ibtstack/src -ISTM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include -ISTM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/Include -ISTM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -ISTM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/inc -ISTM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/inc -ISTM32F4-Discovery_FW_V1.1.0/Utilities/STM32F4-Discovery btstack/src/btstack_memory.c btstack/src/linked_list.c btstack/src/memory_pool.c btstack/src/run_loop.c btstack/src/run_loop_embedded.c btstack/src/hci.c btstack/src/hci_cmds.c btstack/src/hci_dump.c btstack/src/l2cap.c btstack/src/l2cap_signaling.c btstack/src/remote_device_db_memory.c btstack/src/rfcomm.c btstack/src/sdp.c btstack/src/sdp_util.c btstack/src/util s.c STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_hcd.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_stdreq.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_core.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_hcs.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_ioreq.c STM32F4-Discovery_FW_V1.1.0/Utilities/STM32F4-Discovery/stm32f4_discovery.c main.c usbh_bt_core.c hci_transport_uubt.c os/none/hal_bt_os.c os/none/stm32f4xx_it.c clones/system_stm32f4xx.c clones/usb_bsp.c clones/newlib_stubs.c dummy/usbh_usr.c -o uubt-noos.elf -lc -lgcc \ -LSTM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver -lSTM32F4xx_StdPeriph_Driver usbh_bt_core.c: In function 'usb_bt_evt_process': usbh_bt_core.c:260:6: warning: large integer implicitly truncated to unsigned type /opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/bin/ld: cannot find -lSTM32F4xx_StdPeriph_Driver collect2: ld returned 1 exit status make: *\ [uubt-noos.elf] Error 1
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/2
Kind regards, Byly.
Thank you very much for the quick reply. I will search for the older version and try again.
It would be wonderful if you could get it to work with the latest version as this can be a valuable project for many people. It certainly will be a big part of the open source system we are designing!
Hello,
Could you provide your copy of the STM32F4-discovery firmware that is known to work? you can reach me at
brent (a t) autosportlabs.com
This would be very significant for us. Thank you very much for your help.
-Brent
Unfortunately, I can not find it. What is version you tried? As far as I remember, STM32F4-discovery 1.1.0 package is just a bit too fresh, but I'm not sure.
On Fri, Nov 08, 2013 at 02:58:35PM -0800, brentpicasso wrote:
Hello,
Could you provide your copy of the STM32F4-discovery firmware that is known to work? you can reach me at
brent (a t) autosportlabs.com
This would be very significant for us. Thank you very much for your help.
-Brent
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/2#issuecomment-28105189
Kind regards, Byly.
So from the error above, it seems to be compiling, but the uubt makefile is looking for a library and it's not present -
ld: cannot find -lSTM32F4xxStdPeriph_Driver
Do I need to build the static libraries separately before attempting to build uubt?
The alternate Discovery firmware was found here - https://github.com/nabilt/STM32F4-Discovery-Firmware
i claims to be V1.0.1.
With this version I get a different error: rm-none-eabi-gcc -g -O0 -mlittle-endian -mthumb -mcpu=cortex-m4 -ffreestanding -nostdlib -DUSE_STDPERIPH_DRIVER=1 -DSTM32F4XX=1 -DUSE_USB_OTG_FS=1 -Wl,-T,./clones/stm32_flash.ld -I. -I./conf -I./clones -I./dummy -Ibtstack/include -Ibtstack/src -ISTM32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Include -ISTM32F4-Discovery-Firmware/Libraries/CMSIS/Include -ISTM32F4-Discovery-Firmware/Libraries/STM32F4xx_StdPeriph_Driver/inc -ISTM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/inc -ISTM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/inc -ISTM32F4-Discovery-Firmware/Utilities/STM32F4-Discovery btstack/src/btstack_memory.c btstack/src/linked_list.c btstack/src/memory_pool.c btstack/src/run_loop.c btstack/src/run_loop_embedded.c btstack/src/hci.c btstack/src/hci_cmds.c btstack/src/hci_dump.c btstack/src/l2cap.c btstack/src/l2cap_signaling.c btstack/src/remote_device_db_memory.c btstack/src/rfcomm.c btstack/src/sdp.c btstack/src/sdp_util.c btstack/src/utils.c STM32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_core.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_stdreq.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_core.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_hcs.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_ioreq.c STM32F4-Discovery-Firmware/Utilities/STM32F4-Discovery/stm32f4_discovery.c main.c usbh_bt_core.c hci_transport_uubt.c os/none/hal_bt_os.c os/none/stm32f4xx_it.c clones/system_stm32f4xx.c clones/usb_bsp.c clones/newlib_stubs.c dummy/usbh_usr.c -o uubt-noos.elf -lc -lgcc \ -LSTM32F4-Discovery-Firmware/Libraries/STM32F4xx_StdPeriph_Driver STM32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s: Assembler messages: STM32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s:97: Error: bad instruction `enable CP10,CP11' STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c: In function 'USB_OTG_USBH_handle_port_ISR': STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c:436:3: error: expected ';' before '}' token clones/system_stm32f4xx.c: In function 'SetSysClock': clones/system_stm32f4xx.c:384:16: error: 'PWR_CR_VOS' undeclared (first use in this function) clones/system_stm32f4xx.c:384:16: note: each undeclared identifier is reported only once for each function it appears in make: *\ [uubt-noos.elf] Error 1
Yes, you should compile libStdPeriph. It's build process was documented by STM somewhere.
V1.0.1 is possibly the exact necessary version (if the patch applies cleanly).
On Sat, Nov 09, 2013 at 10:08:27AM -0800, brentpicasso wrote:
So from the error above, it seems to be compiling, but the uubt makefile is looking for a library and it's not present -
ld: cannot find -lSTM32F4xxStdPeriph_Driver
Do I need to build the static libraries separately before attempting to build uubt?
The alternate Discovery firmware was found here - https://github.com/nabilt/STM32F4-Discovery-Firmware
i claims to be V1.0.1.
With this version I get a different error: rm-none-eabi-gcc -g -O0 -mlittle-endian -mthumb -mcpu=cortex-m4 -ffreestanding -nostdlib -DUSE_STDPERIPH_DRIVER=1 -DSTM32F4XX=1 -DUSE_USB_OTG_FS=1 -Wl,-T,./clones/stm32_flash.ld -I. -I./conf -I./clones -I./dummy -Ibtstack/include -Ibtstack/src -ISTM32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Include -ISTM32F4-Discovery-Firmware/Libraries/CMSIS/Include -ISTM32F4-Discovery-Firmware/Libraries/STM32F4xx_StdPeriph_Driver/inc -ISTM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/inc -ISTM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/inc -ISTM32F4-Discovery-Firmware/Utilities/STM32F4-Discovery btstack/src/btstack_memory.c btstack/src/linked_list.c btstack/src/memory_pool.c btstack/src/run_loop.c btstack/src/run_loop_embedded.c btstack/src/hci.c btstack/src/hci_cmds.c btstack/src/hci_dump.c btstack/src/l2cap.c btstack/src/l2cap_signaling.c btstack/src/remote_device_db_memory.c btstack/src/rfcomm.c btstack/src/sdp.c btstack/src/sdp_util.c btstack/src/utils.c STM 32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_core.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_stdreq.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_core.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_hcs.c STM32F4-Discovery-Firmware/Libraries/STM32_USB_HOST_Library/Core/src/usbh_ioreq.c STM32F4-Discovery-Firmware/Utilities/STM32F4-Discovery/stm32f4_discovery.c main.c usbh_bt_core.c hci_transport_uubt.c os/none/hal_bt_os.c os/none/stm32f4xx_it.c clones/system_stm32f4xx.c clones/usb_bsp.c clones/newlib_stubs.c dummy/usbh_usr.c -o uubt-noos.elf -lc -lgcc \ -LSTM32F4-Discovery-Firmware/Libraries/STM32F4xx_StdPeriph_Driver STM32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s: Assembler messages: STM32F4-Discovery-Firmware/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s:97: Error: bad instruction `enable CP10,CP11' STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c: In function 'USB_OTG_USBH_handle_port_ISR': STM32F4-Discovery-Firmware/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c:436:3: error: expected ';' before '}' token clones/system_stm32f4xx.c: In function 'SetSysClock': clones/system_stm32f4xx.c:384:16: error: 'PWR_CR_VOS' undeclared (first use in this function) clones/system_stm32f4xx.c:384:16: note: each undeclared identifier is reported only once for each function it appears in make: *\ [uubt-noos.elf] Error 1
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/2#issuecomment-28133028
Kind regards, Byly.
Thank you. will research that.
Oddly, I have been required to patch manually, it seems that the line number references in the file are off by 1 or 2 lines consistently.
-Brent
Hello,
I am trying to compile on Linux- I have downloaded the btstack and stm32f4-discovery firmware, updated the Makefile to point to these sub directories, and copied in what I believe was an appropriate flash linker script.
I am seeing the following make error. I'm thinking perhaps you used a older version of the STM32F4-discovery firmware? I have also noticed the patch you supplied failed to apply for me, I will be looking into manually patching as well.
I have also uploaded a copy of the uubt code in the current state I'm testing, so you can reproduce, here: http://dropcanvas.com/1zw07
Thank you so much for creating this code, it will help immensely with our open source project.
[brent@ubuntu src]$ make arm-none-eabi-gcc -g -O0 -mlittle-endian -mthumb -mcpu=cortex-m4 -ffreestanding -nostdlib -DUSE_STDPERIPH_DRIVER=1 -DSTM32F4XX=1 -DUSE_USB_OTG_FS=1 -Wl,-T,./clones/stm32_flash.ld -I. -I./conf -I./clones -I./dummy -Ibtstack/include -Ibtstack/src -ISTM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Include -ISTM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/Include -ISTM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc -ISTM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/inc -ISTM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/inc -ISTM32F4-Discovery_FW_V1.1.0/Utilities/STM32F4-Discovery btstack/src/btstack_memory.c btstack/src/linked_list.c btstack/src/memory_pool.c btstack/src/run_loop.c btstack/src/run_loop_embedded.c btstack/src/hci.c btstack/src/hci_cmds.c btstack/src/hci_dump.c btstack/src/l2cap.c btstack/src/l2cap_signaling.c btstack/src/remote_device_db_memory.c btstack/src/rfcomm.c btstack/src/sdp.c btstack/src/sdp_util.c btstack/src/utils.c STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_core.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_hcd.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_OTG_Driver/src/usb_hcd_int.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_stdreq.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_core.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_hcs.c STM32F4-Discovery_FW_V1.1.0/Libraries/STM32_USB_HOST_Library/Core/src/usbh_ioreq.c STM32F4-Discovery_FW_V1.1.0/Utilities/STM32F4-Discovery/stm32f4_discovery.c main.c usbh_bt_core.c hci_transport_uubt.c os/none/hal_bt_os.c os/none/stm32f4xx_it.c clones/system_stm32f4xx.c clones/usb_bsp.c clones/newlib_stubs.c dummy/usbh_usr.c -o uubt-noos.elf -lc -lgcc \ -LSTM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver -lSTM32F4xx_StdPeriph_Driver usbh_bt_core.c: In function 'usb_bt_evt_process': usbh_bt_core.c:260:6: warning: large integer implicitly truncated to unsigned type /opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-eabi/4.5.2/../../../../arm-none-eabi/bin/ld: cannot find -lSTM32F4xx_StdPeriph_Driver collect2: ld returned 1 exit status make: *\ [uubt-noos.elf] Error 1