Search found 605 matches

by steved
Sun Sep 08, 2019 9:40 pm
Forum: STM32 Support
Topic: Hard fault when exiting stop mode with RTC alarm on STM32F051
Replies: 13
Views: 207

Re: Hard fault when exiting stop mode with RTC alarm on STM32F051

Often hard faults turn out to be the result of a stack overflow (not always on the thread which generates the hard fault). Or sometimes a bad pointer, so a write goes to somewhere it shouldn't. So you could look in detail at the offending instruction - check register values, and what they mean in th...
by steved
Sat Aug 31, 2019 8:26 pm
Forum: Bug Reports
Topic: chprintf() - float precision
Replies: 2
Views: 171

Re: chprintf() - float precision

Thanks Bob - I'll add that to my mods
by steved
Thu Aug 29, 2019 8:59 am
Forum: Bug Reports
Topic: chprintf() - float precision
Replies: 2
Views: 171

chprintf() - float precision

chprintf() doesn't print a float correctly when the precision comes from a variable - "%1.*f" prints "*f"
Added line 204 in the attached; moves source pointer on after reading and actioning the '*'
by steved
Sun Aug 25, 2019 8:24 am
Forum: STM32 Support
Topic: STM32F103C8 Blue pill with ChibiOS Topic is solved
Replies: 2
Views: 127

Re: STM32F103C8 Blue pill with ChibiOS Topic is solved

To start, use a board file that has the same processor on it (or as close as you can get). Then adapt it.

Others have certainly used the Blue Pill board, so a forum search should yield some tips.
by steved
Fri Aug 23, 2019 8:22 am
Forum: Bug Reports
Topic: strncpy() Topic is solved
Replies: 3
Views: 136

Re: strncpy() Topic is solved

It is known, the rationale is that the object name has a known maximum length, string functions are never used unless in the "n" variant. Looking at dyn_create_object_pool(), for example, it's called from chFactoryRegisterObject(), which is a public api function. Thus if the passed object...
by steved
Thu Aug 22, 2019 1:29 pm
Forum: Bug Reports
Topic: strncpy() Topic is solved
Replies: 3
Views: 136

strncpy() Topic is solved

One of those arguable ones! There's some use of strncpy() - in chfactory.c and nasa_cfe\osal\src\osapi.c It's potentially unsafe because you can end up with an unterminated string. strlcpy() is a safer option - although not in the C standard, its available in GCC and various other environments. And ...
by steved
Fri Aug 16, 2019 2:18 pm
Forum: General Support
Topic: Modifying board.c
Replies: 1
Views: 104

Modifying board.c

I have a board where board.c needs to differ from the auto-generated template using board.chcfg. The differences include using a #define to disable GPIO setup, for example. Also adding a couple of board-specific routines. Is there a way to achieve this within the existing structure? (I realise I can...
by steved
Wed Aug 14, 2019 1:44 pm
Forum: Small Change Requests
Topic: Compiler version select in makefile
Replies: 0
Views: 205

Compiler version select in makefile

Rather than selecting the compiler version to run at startup of the ChibiStudio IDE, would it be possible to select the version in the makefile? This would ensure that a project was always compiled with the "correct" compiler, rather than having to start up the appropriate IDE. It would he...
by steved
Wed Aug 14, 2019 1:35 pm
Forum: Bug Reports
Topic: ccportab.h
Replies: 2
Views: 144

Re: ccportab.h

Does it have to belong to a layer? It really belongs with the compiler in use, to be included at the top of every file that is compiled. For gcc, -include file (or maybe -imacros file) on the command line would do it; no doubt other compilers have similar options. That command line value could be ap...
by steved
Sun Aug 11, 2019 3:20 pm
Forum: Small Change Requests
Topic: wspi memory mapping calls
Replies: 2
Views: 95

Re: wspi memory mapping calls

Shouldn't the application "know" its state? failing with an assert by calling an API on a wrong SM state is a pattern used everywhere in HAL. It is about not hiding potential problems. Not necessarily, without duplicating the state-tracking code. This arose in some test routines, where va...

Go to advanced search