Page 4 of 5

Re: Support for STM32G0B1

Posted: Mon Oct 02, 2023 8:39 am
by Giovanni
Hi,

I need to find one of those boards. I would not trust the compiler, please give the official ARM GCC a try, in the past we had problems with compilers taken from repos. You may also try ChibiStudio for Linux (also available as a VirtualBox VM), it includes everything needed.

About bugs, start with reporting them, you may make a donation to the project afterward.

Giovanni

Re: Support for STM32G0B1

Posted: Mon Oct 02, 2023 6:57 pm
by charlesrwest
I will go ahead and do that. If that doesn't resolve the issue, I will go ahead and open a new ticket (you mentioned reopening a new ticket previously).

I have a spare Nucleo-G0B1RE and would be more than happy to send it to you or send a new one from STM. Could you PM me the address to send it to?

Re: Support for STM32G0B1

Posted: Mon Oct 02, 2023 8:53 pm
by Giovanni
Hi,

NP, I should have one already. It is best if you open one ticket for each issue you find, this makes them easier to track and close.

Giovanni

Re: Support for STM32G0B1

Posted: Wed Oct 04, 2023 2:09 am
by charlesrwest
It didn't work with the arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi from Arm's site either.

Re: Support for STM32G0B1

Posted: Mon Oct 09, 2023 12:24 pm
by Giovanni
Hi,

I just tested the demo in the trunk version, it works, this is the report:

Code: Select all


*** ChibiOS/RT Test Suite
***
*** Compiled:     Oct  9 2023 - 13:20:28
*** Platform:     STM32G0 Extended Flash
*** Test Board:   STMicroelectronics STM32 Nucleo64-G0B1RE
***
*** Text size:    48324 bytes
*** RO data size: 10856 bytes
*** Data size:    260 bytes
*** BSS size:     5524 bytes

============================================================================
=== Test Sequence 1 (Information)
----------------------------------------------------------------------------
--- Test Case 1.1 (Port Info)
--- Architecture:                       ARMv6-M
--- Core Variant:                       Cortex-M0+
--- Compiler:                           GCC 12.2.0
--- Port Info:                          Preemption through NMI
--- Natural alignment:                  4
--- Stack alignment:                    8
--- Working area alignment:             8
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (Kernel Info)
--- Product:                            ChibiOS/RT
--- Stable Flag:                        0
--- Version String:                     7.1.0
--- Major Number:                       7
--- Minor Number:                       1
--- Patch Number:                       0
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (Kernel Settings)
--- CH_CFG_ST_RESOLUTION:               32
--- CH_CFG_ST_FREQUENCY:                10000
--- CH_CFG_INTERVALS_SIZE:              32
--- CH_CFG_TIME_TYPES_SIZE:             32
--- CH_CFG_ST_TIMEDELTA:                2
--- CH_CFG_TIME_QUANTUM:                0
--- CH_CFG_MEMCORE_SIZE:                0
--- CH_CFG_NO_IDLE_THREAD:              0
--- CH_CFG_OPTIMIZE_SPEED:              1
--- CH_CFG_USE_TM:                      0
--- CH_CFG_USE_REGISTRY:                1
--- CH_CFG_USE_WAITEXIT:                1
--- CH_CFG_USE_SEMAPHORES:              1
--- CH_CFG_USE_SEMAPHORES_PRIORITY:     0
--- CH_CFG_USE_MUTEXES:                 1
--- CH_CFG_USE_MUTEXES_RECURSIVE:       0
--- CH_CFG_USE_CONDVARS:                1
--- CH_CFG_USE_CONDVARS_TIMEOUT:        1
--- CH_CFG_USE_EVENTS:                  1
--- CH_CFG_USE_EVENTS_TIMEOUT:          1
--- CH_CFG_USE_MESSAGES:                1
--- CH_CFG_USE_MESSAGES_PRIORITY:       0
--- CH_CFG_USE_DYNAMIC:                 1
--- CH_DBG_STATISTICS:                  0
--- CH_DBG_SYSTEM_STATE_CHECK:          0
--- CH_DBG_ENABLE_CHECKS:               0
--- CH_DBG_ENABLE_ASSERTS:              0
--- CH_DBG_TRACE_MASK:                  255
--- CH_DBG_TRACE_BUFFER_SIZE:           128
--- CH_DBG_ENABLE_STACK_CHECK:          0
--- CH_DBG_FILL_THREADS:                0
--- CH_DBG_THREADS_PROFILING:           0
--- Result: SUCCESS
============================================================================
=== Test Sequence 2 (System layer and port interface)
----------------------------------------------------------------------------
--- Test Case 2.1 (System integrity functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Critical zones functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Interrupts handling functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 3 (Time and Intervals Functionality)
----------------------------------------------------------------------------
--- Test Case 3.1 (System Tick Counter functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Time ranges functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 4 (Time Stamps Functionality)
----------------------------------------------------------------------------
--- Test Case 4.1 (Time Stamps functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 5 (Threads Functionality)
----------------------------------------------------------------------------
--- Test Case 5.1 (Thread Sleep functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.2 (Ready List functionality, threads priority order)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.3 (Priority change test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.4 (Priority change test with Priority Inheritance)
--- Result: SUCCESS
============================================================================
=== Test Sequence 6 (Suspend/Resume)
----------------------------------------------------------------------------
--- Test Case 6.1 (Suspend and Resume functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 7 (Counter Semaphores)
----------------------------------------------------------------------------
--- Test Case 7.1 (Semaphore primitives, no state change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.2 (Semaphore enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.3 (Semaphore timeout test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.4 (Testing chSemAddCounterI() functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.5 (Testing chSemWaitSignal() functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.6 (Testing Binary Semaphores special case)
--- Result: SUCCESS
============================================================================
=== Test Sequence 8 (Mutexes, Condition Variables and Priority Inheritance)
----------------------------------------------------------------------------
--- Test Case 8.1 (Priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.2 (Priority return verification)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.3 (Repeated locks, non recursive scenario)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.4 (Condition Variable signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.5 (Condition Variable broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.6 (Condition Variable priority boost test)
--- Result: SUCCESS
============================================================================
=== Test Sequence 9 (Synchronous Messages)
----------------------------------------------------------------------------
--- Test Case 9.1 (Messages Server loop)
--- Result: SUCCESS
============================================================================
=== Test Sequence 10 (Event Sources and Event Flags)
----------------------------------------------------------------------------
--- Test Case 10.1 (Events registration)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Event Flags dispatching)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.3 (Events Flags wait using chEvtWaitOne())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.4 (Events Flags wait using chEvtWaitAny())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.5 (Events Flags wait using chEvtWaitAll())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.6 (Events Flags wait timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.7 (Broadcasting using chEvtBroadcast())
--- Result: SUCCESS
============================================================================
=== Test Sequence 11 (Dynamic threads)
----------------------------------------------------------------------------
--- Test Case 11.1 (Threads creation from Memory Heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Threads creation from Memory Pool)
--- Result: SUCCESS
============================================================================
=== Test Sequence 12 (Benchmarks)
----------------------------------------------------------------------------
--- Test Case 12.1 (Messages performance #1)
--- Score : 259103 msgs/S, 518206 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.2 (Messages performance #2)
--- Score : 222217 msgs/S, 444434 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.3 (Messages performance #3)
--- Score : 222217 msgs/S, 444434 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.4 (Context Switch performance)
--- Score : 689096 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.5 (Threads performance, full cycle)
--- Score : 128770 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.6 (Threads performance, create/exit only)
--- Score : 165373 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.7 (Mass reschedule performance)
--- Score : 74592 reschedules/S, 447552 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.8 (Round-Robin voluntary reschedule)
--- Score : 475820 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.9 (Virtual Timers set/reset performance)
--- Score : 306298 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.10 (Semaphores wait/signal performance)
--- Score : 2813156 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.11 (Mutexes lock/unlock performance)
--- Score : 633656 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 12.12 (RAM Footprint)
--- OS    : 144 bytes
--- Thread: 76 bytes
--- Timer : 24 bytes
--- Semaph: 12 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS

*** ChibiOS OS Library Test Suite
***
*** Compiled:     Oct  9 2023 - 13:20:28
*** Platform:     STM32G0 Extended Flash
*** Test Board:   STMicroelectronics STM32 Nucleo64-G0B1RE
***
*** Text size:    48324 bytes
*** RO data size: 10856 bytes
*** Data size:    260 bytes
*** BSS size:     5524 bytes

============================================================================
=== Test Sequence 1 (Information)
----------------------------------------------------------------------------
--- Test Case 1.1 (Port Info)
--- Architecture:                       ARMv6-M
--- Core Variant:                       Cortex-M0+
--- Compiler:                           GCC 12.2.0
--- Port Info:                          Preemption through NMI
--- Natural alignment:                  4
--- Stack alignment:                    8
--- Working area alignment:             8
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (OS Library Info)
--- Product:                            ChibiOS/LIB
--- Stable Flag:                        0
--- Version String:                     1.4.0
--- Major Number:                       1
--- Minor Number:                       4
--- Patch Number:                       0
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (OS Library Settings)
--- CH_CFG_USE_MAILBOXES:               1
--- CH_CFG_USE_MEMCORE:                 1
--- CH_CFG_USE_HEAP:                    1
--- CH_CFG_USE_MEMPOOLS:                1
--- CH_CFG_USE_OBJ_FIFOS:               1
--- CH_CFG_USE_PIPES:                   1
--- CH_CFG_USE_OBJ_CACHES:              1
--- CH_CFG_USE_DELEGATES:               1
--- CH_CFG_USE_FACTORY:                 1
--- CH_CFG_FACTORY_MAX_NAMES_LENGTH:    8
--- CH_CFG_FACTORY_OBJECTS_REGISTRY:    1
--- CH_CFG_FACTORY_GENERIC_BUFFERS:     1
--- CH_CFG_FACTORY_SEMAPHORES:          1
--- CH_CFG_FACTORY_MAILBOXES:           1
--- CH_CFG_FACTORY_OBJ_FIFOS:           1
--- CH_CFG_FACTORY_PIPES:               1
--- Result: SUCCESS
============================================================================
=== Test Sequence 2 (Mailboxes)
----------------------------------------------------------------------------
--- Test Case 2.1 (Mailbox normal API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Mailbox I-Class API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Mailbox timeouts)
--- Result: SUCCESS
============================================================================
=== Test Sequence 3 (Pipes)
----------------------------------------------------------------------------
--- Test Case 3.1 (Pipes normal API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Pipe timeouts)
--- Result: SUCCESS
============================================================================
=== Test Sequence 4 (Jobs Queues)
----------------------------------------------------------------------------
--- Test Case 4.1 (Dispatcher test)
--- Result: SUCCESS
============================================================================
=== Test Sequence 5 (Thread Delegates)
----------------------------------------------------------------------------
--- Test Case 5.1 (Dispatcher test)
--- Result: SUCCESS
============================================================================
=== Test Sequence 6 (Objects Caches)
----------------------------------------------------------------------------
--- Test Case 6.1 (Cache initialization)
--- Result: SUCCESS
============================================================================
=== Test Sequence 7 (Memory Pools)
----------------------------------------------------------------------------
--- Test Case 7.1 (Loading and emptying a memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.2 (Loading and emptying a guarded memory pool without waiting)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.3 (Guarded Memory Pools timeout)
--- Result: SUCCESS
============================================================================
=== Test Sequence 8 (Memory Heaps)
----------------------------------------------------------------------------
--- Test Case 8.1 (Allocation and fragmentation)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.2 (Default Heap)
--- Result: SUCCESS
============================================================================
=== Test Sequence 9 (Objects Factory)
----------------------------------------------------------------------------
--- Test Case 9.1 (Objects Registry)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.2 (Dynamic Buffers Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.3 (Dynamic Semaphores Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.4 (Dynamic Mailboxes Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.5 (Dynamic Objects FIFOs Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.6 (Dynamic Pipes Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS


Please check if you are flashing the device correctly or use a debugger and see where it hangs and if reaches the main() function.

Giovanni

Re: Support for STM32G0B1

Posted: Mon Oct 09, 2023 1:54 pm
by charlesrwest
That's great news. Thank you.

If I may ask, is there any chance I could get the binary you loaded and the address you loaded it to? It would be extremely useful for figuring out where things are going wrong.

Re: Support for STM32G0B1

Posted: Mon Oct 09, 2023 2:15 pm
by Giovanni
Sure

ch.7z
(285.87 KiB) Downloaded 657 times


Giovanni

Re: Support for STM32G0B1

Posted: Mon Oct 09, 2023 7:16 pm
by charlesrwest
Thank you.

That binary loads and blinks, so it must be somewhere in the compilation chain. I will try to track it down. Sorry for the trouble and thanks again.

Re: Support for STM32G0B1

Posted: Mon Nov 06, 2023 3:41 pm
by Giovanni
Hi,

Any news?

Giovanni

Re: Support for STM32G0B1

Posted: Tue Nov 07, 2023 12:51 am
by charlesrwest
Apologies.

It looks like what I thought was an a pristine example folder was not. Once I recopied the folder the blinking example worked (bit of egg on my face there). Once that was established I moved my development over to the STM32G0B1VET6 that's on my custom PCB.

I have observed the following:
1. Basic functionality works (such as a thread blinking an LED) and seems to extend to pins not present on the original dev board without modification.
2. PWM using timer 1 and timer 14 works (and was used for driving a brushless motor and battery charging respectively).
3. Attempting to use timer 2 or timer 3 for PWM causes a compilation error (as previously documented). This is currently preventing the other 3 brushless motors from being driven.
4. The ADC functionality appears to be working. I am currently reading from two ADC pins (PA1, PA2) and things are working as expected.
5. Pal based callbacks appear to be operating (3 used with the functional brushless motor for the hall sensors).
6. I'm getting some really odd behavior on PF3 and PF4. PF3 causes a crash if set to PAL_MODE_INPUT_PULLUP but works if set to PAL_MODE_INPUT_PULLDOWN.... until you drive it high and then it causes a crash. From my notes PF4 seems to have similar behavior while PF5 works just fine. No idea what is going on there but I can't send you a reproducing example because the NUCLEO-G0B1RE doesn't have those pins.
7. chprintf with SD1 appears to be working as expected.

Apologies for the late/incomplete information. Is there anything I can do to help fix these issues? The next draft of the robot PCB gets back in about 5 weeks and I would very much like to resolve this before then and be able to drive all four wheels.