Page 2 of 3

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Wed Oct 29, 2014 7:16 pm
by mobyfab
The official one has many fixes that the linaro toolchain lacks. Also the C libs are heavily modified for it.

So you tried it and still have problems?
Which gcc version did you try?

Which "usb test" did you try? Do you mean the usb example in the testhal folder?

Which board are you using?

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Wed Oct 29, 2014 11:05 pm
by lesto
Which gcc version did you try?


arm-none-eabi-gcc47-linaro-4.7_2014.06-1
gcc-arm-none-eabi-bin 4.8_2014_q3_update-1 (official ARM)
arm-none-eabi-gcc 4.9.1-1

Which "usb test" did you try?

USB-CDC driver demo for STM32F30x

Which board are you using?

STM32F3-Discovery

linux 3.17.1-1-ARCH

i'll compile on chibistudio, the windows machine is almost ready, and 2 day without internet at home has slow me down

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Fri Oct 31, 2014 1:04 am
by lesto
tested right now COMPILING on windows and running in linux: 2.6 gives warning but run, 3.0 does not enumerate.

i've also tryed to run it on windows, but seems like win 7 does not like cdc on USB 3.0 port.... it keeps failing installing driver, i've tryed a lot of them, even "USB Inf Builder".... seems like it see VID and PID "0000" followed by a lot of garbage. Arduino UNO on CDC work fine on USB 2.0 and 3.0 ports. Also programming the ST run fine on usb 3 and 2

2.6 (compiled on windows) runs fine on windows usb 2.0 port (i don't know where is keeps log, so i don't know if give equivalent warning as linux)

3.0 (compiled on windows, no LTO) does NOT run on usb2.0; it give explicit message "usb device did not work correctly" ( in my language, tranlation may vary :) )
strange it does NOT give this error on USB3.0 port

all compiling (of all test) has been done on ONE machine, while plug test has been done on the above machine and another machine, a laptop without usb3.0 but still running linux.

i'll try to get my hand on another board and set up the other PC to test that.

meanwhile, using UART + FTDI chip run just fine. i'm loosing bandwith, but i don't care as it was planned to use xbee as communication link... just this puzzle me a lot. I may provide more USB sniff on windows and linux with wireshark, and even try to undertsand the one provided (of chibios3 some post ago) but free time is low and i want to go on the project.
tell me if and how i can provide usefull information

lesto


edit: to run chibios3 on chibistudio i do this:
close eclipse
rename chibios and workspace as chibios2.6 and workspace2.6
dowloaded chibios3
renamed the folder to chibios and place where it should be
open eclipse (workspace folder is created)
copy "C:\ChibiStudio\workspace2.6\.metadata\.plugins\org.eclipse.debug.core" to "C:\ChibiStudio\workspace\.metadata\.plugins\org.eclipse.debug.core" (this will give you external tool "openocd")
import existing project (be sure copy on workspace is NOT flagged)
run openocd
build and upload test USB CDC

from here, i just close eclipse and swap chibios and workspace folder between the two version. a "swap batch" may be easly writte, not tested but i'm pretty sure "hotswap" will create A LOT of problem, just don't do it

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Fri Oct 31, 2014 9:15 am
by Giovanni
You can create 2 workspaces, one for ChibiOS2 another for ChibiOS3. It is what I will do in next release.

Giovanni

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Fri Oct 31, 2014 2:11 pm
by lesto
you a re right, but the swithing workspe is not "clean" as they would still point to a generic "chibios" folder witch has old code, i think.

that way was the less messy i found, to be sure the probelm is NOT from a human error.

i've found a frind with is ready to make some cross test. he'll work on it this week end, and if it get it working we will cross test, if not.. i have no idea.

i still find strange that i'm the only ne with this kind of problem, even using chibistudio :cry:

about the warning, probabily everyone has them but nobody look at dmesg normally, but about chibios3 failing to enumerate.. no idea.

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Fri Oct 31, 2014 2:25 pm
by Giovanni
Consider common elements, an USB3 port? an USB switch? a specific USB cable? there must be a common element.

Giovanni

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Sat Nov 01, 2014 10:25 am
by Giovanni
Hi,

A problem has been fixed in the STM32F4xx-USB_CDC demo, could you try it again?

Note that the demo targets an Olimex STM32-FE407 board, if you are using a different one then you should make changes in the Makefile and main.c because the different pins definitions.

Giovanni

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Mon Nov 03, 2014 11:09 am
by lesto
i use to checkout from https://github.com/mabl/ChibiOS witch seems to have testHal already setup for stm32f3discovery, because official https://github.com/ChibiOS has the oldest commit about 30 days ago... maybe the cloning daemon is broken?

btw i'll test tonigh, yay!

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Mon Nov 03, 2014 11:35 pm
by lesto
usb 7-3.4: new full-speed USB device number 5 using ehci-pci
[ 8504.225499] usb 7-3.4: USB disconnect, device number 5
[ 8517.858338] usb 7-3.4: new full-speed USB device number 6 using ehci-pci
[ 8517.938193] usb 7-3.4: device descriptor read/64, error -32
[ 8518.121297] usb 7-3.4: device descriptor read/64, error -32
[ 8518.307661] usb 7-3.4: new full-speed USB device number 7 using ehci-pci
[ 8518.387517] usb 7-3.4: device descriptor read/64, error -32
[ 8518.570625] usb 7-3.4: device descriptor read/64, error -32
[ 8518.753730] usb 7-3.4: new full-speed USB device number 8 using ehci-pci
[ 8518.990537] cdc_acm 7-3.4:1.0: This device cannot do calls on its own. It is not a modem.
[ 8518.990569] cdc_acm 7-3.4:1.0: ttyACM0: USB ACM device
[ 8518.991053] usbcore: registered new interface driver cdc_acm
[ 8518.991054] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters


IT DOES WORK! (rm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.4 20140725 (release) ) notice even this version have LTO bug -.-"

confirmed workin even with latest arm-none-eabi-gcc (Arch Repository) 4.9.1

Code: Select all

info
Kernel:       3.0.0dev
Compiler:     GCC 4.9.1
Architecture: ARMv7-ME
Core Variant: Cortex-M4
Port Info:    Advanced kernel mode
Platform:     STM32F303xC Analog & DSP
Board:        STMicroelectronics STM32F3-Discovery
Build time:   Nov  3 2014 - 22:22:11
ch> mem
core free memory : 30056 bytes
heap fragments   : 1
heap free total  : 512 bytes
ch> threads
    addr    stack prio refs     state
20000CE0 20000794   64    1  SLEEPING 134255863
20000D40 20000DF4    1    1     READY 134255863
20001BA8 20001CA4   64    1  SLEEPING 134255863
20001FA8 20002784   64    1   CURRENT 134255863
ch> test

*** ChibiOS/RT test suite
***
*** Kernel:       3.0.0dev
*** Compiled:     Nov  3 2014 - 22:22:05
*** Compiler:     GCC 4.9.1
*** Architecture: ARMv7-ME
*** Core Variant: Cortex-M4
*** Port Info:    Advanced kernel mode
*** Platform:     STM32F303xC Analog & DSP
*** Test Board:   STMicroelectronics STM32F3-Discovery

----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (Threads, enqueuing test #2)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (Threads, priority change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.4 (Threads, delays)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.1 (Semaphores, enqueuing)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Semaphores, timeout)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Semaphores, atomic signal-wait)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.4 (Binary Semaphores, functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.1 (Mutexes, priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Mutexes, priority return)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.3 (Mutexes, status)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.4 (CondVar, signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.5 (CondVar, broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.6 (CondVar, boost test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.1 (Messages, loop)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.1 (Mailboxes, queuing and timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.1 (Events, registration and dispatch)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.2 (Events, wait and broadcast)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.3 (Events, timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.1 (Heap, allocation and fragmentation test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.1 (Memory Pools, queue/dequeue)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.1 (Dynamic APIs, threads creation from heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.2 (Dynamic APIs, threads creation from memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.3 (Dynamic APIs, registry and references)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.1 (Queues, input queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Queues, output queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1)
--- Score : 58624 msgs/S, 117248 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2)
--- Score : 52319 msgs/S, 104638 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.3 (Benchmark, messages #3)
--- Score : 52319 msgs/S, 104638 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.4 (Benchmark, context switch)
--- Score : 258968 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 15023 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 17165 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
--- Score : 19878 reschedules/S, 119268 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 130776 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
--- Score : 163724 bytes/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
--- Score : 200398 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
--- Score : 143636 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
--- Score : 130372 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.13 (Benchmark, RAM footprint)
--- System: 516 bytes
--- Thread: 96 bytes
--- Timer : 20 bytes
--- Semaph: 12 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- Queue : 36 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS
ch>


(forgot to takle a test with arm chain, reinstalling it now)

Re: Chibios 2.6 USB testHal and a lot of error

Posted: Mon Nov 03, 2014 11:50 pm
by lesto
as promised GCC 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147]

Code: Select all

info
Kernel:       3.0.0dev
Compiler:     GCC 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147]
Architecture: ARMv7-ME
Core Variant: Cortex-M4
Port Info:    Advanced kernel mode
Platform:     STM32F303xC Analog & DSP
Board:        STMicroelectronics STM32F3-Discovery
Build time:   Nov  3 2014 - 22:42:19
ch> mem
core free memory : 30576 bytes
heap fragments   : 0
heap free total  : 0 bytes
ch> threads
    addr    stack prio refs     state
20000CE0 20000794   64    1  SLEEPING 536881208
20000D40 20000DF4    1    1     READY 536881208
20001BA8 20001CA4   64    1  SLEEPING 536881208
20001FA8 2000278C   64    1   CURRENT 536881208
ch> test

*** ChibiOS/RT test suite
***
*** Kernel:       3.0.0dev
*** Compiled:     Nov  3 2014 - 22:42:14
*** Compiler:     GCC 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision 213147]
*** Architecture: ARMv7-ME
*** Core Variant: Cortex-M4
*** Port Info:    Advanced kernel mode
*** Platform:     STM32F303xC Analog & DSP
*** Test Board:   STMicroelectronics STM32F3-Discovery

----------------------------------------------------------------------------
--- Test Case 1.1 (Threads, enqueuing test #1)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (Threads, enqueuing test #2)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (Threads, priority change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.4 (Threads, delays)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.1 (Semaphores, enqueuing)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Semaphores, timeout)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Semaphores, atomic signal-wait)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.4 (Binary Semaphores, functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.1 (Mutexes, priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Mutexes, priority return)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.3 (Mutexes, status)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.4 (CondVar, signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.5 (CondVar, broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.6 (CondVar, boost test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 4.1 (Messages, loop)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.1 (Mailboxes, queuing and timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.1 (Events, registration and dispatch)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.2 (Events, wait and broadcast)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.3 (Events, timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.1 (Heap, allocation and fragmentation test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.1 (Memory Pools, queue/dequeue)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.1 (Dynamic APIs, threads creation from heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.2 (Dynamic APIs, threads creation from memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.3 (Dynamic APIs, registry and references)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.1 (Queues, input queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Queues, output queues)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1)
--- Score : 59007 msgs/S, 118014 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2)
--- Score : 52702 msgs/S, 105404 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.3 (Benchmark, messages #3)
--- Score : 52702 msgs/S, 105404 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.4 (Benchmark, context switch)
--- Score : 260848 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 15055 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 17190 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
--- Score : 19955 reschedules/S, 119730 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 131480 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
--- Score : 164284 bytes/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
--- Score : 200958 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
--- Score : 144792 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
--- Score : 131320 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.13 (Benchmark, RAM footprint)
--- System: 516 bytes
--- Thread: 96 bytes
--- Timer : 20 bytes
--- Semaph: 12 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- Queue : 36 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS
ch>