Page 3 of 3

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Fri Apr 29, 2016 10:00 am
by Giovanni
Adding a note into generated files is a good idea, I will add that to the tool templates.

Giovanni

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Sat Apr 30, 2016 8:57 am
by rew
RoccoMarco wrote:Hey rew,
I will try to answer your question even if I think we are going out of topic.

rew wrote:So why, when I have my own board, do I end up copying and editing the board.h?

Have you seen the video? You just need the .chcfg, editing it and than use generation tool.

Have you read my post? Of course not! Of course I have not seen the video. First I describing history, I've been editing board files for a while now, and I'm getting good at it. As in, I can now have a project that can run on different boards. So the question is: Did this video exist when I first ran into this? Is there a link to that video in the board.h?

Is it realistic to tell people that want to use chibios: "Hey here is the documentation. read it all, watch these videos, then start coding"? No! People want to see a blinky light by compiling the example. They want to get started right away and read documentation as needed when they need information on a specific subject.
rew wrote:So then I follow the compilation process of my project, find the board file I have been using all along, copy it into a subdirectory of my project and start changing it. If it is a generated file, I expect it to start with " /* This file is generated from ... by tool-X DO NOT EDIT */" but instead it starts with the standard source-code-copyright claim

Why this should be notified? The configuration tool (included un ChibiStudio) is an utility. As each utility, it must be used with awareness. Quoting: "There aren't magic bullets..."
YOU are apparently aware of that utility.

Suppose that I search for "changing board configuration in chibios" on google. I get a hit on this forum where Tectu says that it is an eclipse plugin that generates board files. Sorry. That means I'm out. I don't have eclipse. I don't like it. You say its included in chibistudio. I don't use it.

HAL is meant to be a resource to help people to develop most of their application but it is not a magic bullet. I don't think It is able to solve world hunger :mrgreen:

HAL stands for (as far as I know) Hardware Abstratction Layer.

It's primary goal in life should be that I can easily run a simple application (like "blinky") on an STM32F072, an STM32F103, an STM32F205 or an STM32F405. I have one BOARD that fits all of these. On the other hand, an application that just blinks "the first available led", should be compilable on say most STM32xxx discovery boards, as well as the nucelos. That's Hareware Abstraction for you. That's what it is meant to do.

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Sat Apr 30, 2016 10:48 am
by RoccoMarco
Each of us would do things in their own way and it would be chaos. Like you, I'm just trying to help.

The video was created in my spare time with an exhaustive article. When I started there was nothing that documentation. I have experimented same problems. So I decided to contribute. Of course my contribution is not official.

We are certainly out of topic. Thanks for sharing your point of view.
Ciao
RM

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Sun May 01, 2016 12:19 pm
by rew
Let me apologise. You got me worked up yesterday. Sorry for that.

When I don't use Eclipse or chibistudio, is there an option for a commandline-dweller like me? Or am I completely out of luck? You don't have to make a complete howto, but just tell me whether or not, based on your knowledge, it is likely or not possible to do this from the commandline and/or from the makefiles?

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Sun May 01, 2016 12:27 pm
by RoccoMarco
Hey rew,
you have nothing to apologise for... It has been a polite exchange of opinions and I hope there will be more other. :mrgreen:

Giovanni says
You could use the generator outside Eclipse using FMPP as processor and taking the template from the plugin.


I don't know. I will give a try and let you know more precisely

Ciao,
RM

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Fri Jul 28, 2017 11:19 am
by marys
Hello everyone

I found problem in Chibios 17.6.0 with USB.
gcc: gcc-arm-none-eabi-5_2-2015q4

Code: Select all

Jul 28 11:33:20 marys-Precision-M4800 kernel: [ 6027.016481] usb 3-1: new full-speed USB device number 37 using xhci_hcd
Jul 28 11:33:25 marys-Precision-M4800 kernel: [ 6032.128917] usb 3-1: device descriptor read/64, error -110
Jul 28 11:33:37 marys-Precision-M4800 kernel: [ 6044.181876] usb 3-1: new full-speed USB device number 38 using xhci_hcd
Jul 28 11:33:42 marys-Precision-M4800 kernel: [ 6049.294323] usb 3-1: device descriptor read/64, error -110
Jul 28 11:33:55 marys-Precision-M4800 kernel: [ 6062.523393] usb 3-1: new full-speed USB device number 39 using xhci_hcd
Jul 28 11:34:00 marys-Precision-M4800 kernel: [ 6067.635806] usb 3-1: device descriptor read/64, error -110
Jul 28 11:34:16 marys-Precision-M4800 kernel: [ 6082.852998] usb 3-1: device descriptor read/64, error -110
Jul 28 11:34:16 marys-Precision-M4800 kernel: [ 6083.073047] usb 3-1: new full-speed USB device number 40 using xhci_hcd
Jul 28 11:34:21 marys-Precision-M4800 kernel: [ 6088.185480] usb 3-1: device descriptor read/64, error -110

After change compiler settings parametr MCU from cortex-m7 to cortex-m4 in Makefile, USB is working wery well.

Code: Select all

...
# Compiler settings
#
MCU  = cortex-m4
#MCU  = cortex-m7
...


Code: Select all

Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.297462] usb 3-1: new full-speed USB device number 46 using xhci_hcd
Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.427118] usb 3-1: New USB device found, idVendor=0483, idProduct=5740
Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.427121] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.427122] usb 3-1: Product: ChibiOS/RT Virtual COM Port
Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.427124] usb 3-1: Manufacturer: STMicroelectronics
Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.427125] usb 3-1: SerialNumber: 400
Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.427230] usb 3-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
Jul 28 12:12:05 marys-Precision-M4800 kernel: [ 8352.427691] cdc_acm 3-1:1.0: ttyACM1: USB ACM device

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Fri Jul 28, 2017 12:44 pm
by Giovanni
Hi,

Very strange, perhaps a problem with the compiler.

Giovanni

Re: NUCLEO-F746ZG - ChibiOS is great!

Posted: Fri Jul 28, 2017 1:36 pm
by steved
Could it be something to do with memory caching?

As long as nothing else updates the cache manager, adding the following:

Code: Select all

SCB_DisableDCache();

early in main (after the Chibi init) will address that, and maybe prove the point.
Last time I looked, other than enabling cache (if its not enabled by default) ChibiOS didn't update anything in that area.