Atmel Studio - new project from Makefile error (shell related)

ChibiOS public support forum for topics related to the Atmel AVR family of micro-controllers.

Moderators: utzig, tfAteba

vctrvlad
Posts: 21
Joined: Mon Aug 28, 2017 2:27 pm
Location: Timisoara, Romania
Has thanked: 1 time
Been thanked: 3 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby vctrvlad » Fri Sep 22, 2017 11:14 pm

Hi Theodore, thanks for the prompt answer.

On the serial port I only can see the ***/r/n like this:
2017-09-23 00_13_28-Terminal v1.93b - 20141030ß - by Br@y++.png


and this is happening infinitely...

my instruction pointer never gets to reach the instruction below test_execute function:

test_execute((BaseSequentialStream *)&SD1);
while(TRUE) {
chThdSleepMilliseconds(1000);
}

even with the optimisation level set to -O0, and all the rest of the lines above in the main function are called over and over.

It is my first time I try to interact directly with an OS, I have worked untill now on the application level, and/or in systems with superloop, and I am used to make assumptions like "nothing out of "while(1)" in the main function should get called more than once at system startup, or that is a sign of a reset"...correct me if I'm wrong

Regards,
Victor

User avatar
tfAteba
Posts: 422
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 55 times
Been thanked: 29 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby tfAteba » Fri Sep 22, 2017 11:34 pm

Victor,

You did not have the right baud rate configure in your tool.
You must set the baud rate to 115200, it is the default baud rate for the serial console in this demo.
You can find this value in halconf.h file at line 297
regards,

Theo.

User avatar
tfAteba
Posts: 422
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 55 times
Been thanked: 29 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby tfAteba » Fri Sep 22, 2017 11:50 pm

Sorry Victor, I'm working on many things at the same time :) . I look at the wrong file. The default baud rate is 38400 b/s in halconf.h at line 304.

It is my first time I try to interact directly with an OS, I have worked untill now on the application level, and/or in systems with super loop, and I am used to make assumptions like "nothing out of "while(1)" in the main function should get called more than once at system startup, or that is a sign of a reset"...correct me if I'm wrong


The main function is called just one time at startup, all the initialization must be done just one time. That mean that all code inside the main function before the while(TRUE) loop must be executed just once. After that, the code inside the while loop will be called periodically depending on the sleep time used and other threads and priorities.
regards,

Theo.

User avatar
tfAteba
Posts: 422
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 55 times
Been thanked: 29 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby tfAteba » Fri Sep 22, 2017 11:53 pm

Here is the configuration of my tools under linux to see the Test suite message:
port is : /dev/ttyUSB0
flowcontrol : none
baudrate is : 38400
parity is : none
databits are : 8


I use Picocom to sse the serial data . Here is the command used to connect to the serial port: picocom -b 38400 /dev/ttyUSB0
regards,

Theo.

User avatar
tfAteba
Posts: 422
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 55 times
Been thanked: 29 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby tfAteba » Sat Sep 23, 2017 12:06 am

Victor, here is also the how the PIN13 signal look for me after the Test suite.
Attachments
pin13-measurement.png
regards,

Theo.

vctrvlad
Posts: 21
Joined: Mon Aug 28, 2017 2:27 pm
Location: Timisoara, Romania
Has thanked: 1 time
Been thanked: 3 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby vctrvlad » Sat Sep 23, 2017 6:43 am

tfAteba wrote:Sorry Victor, I'm working on many things at the same time :) . I look at the wrong file. The default baud rate is 38400 b/s in halconf.h at line 304.

It is my first time I try to interact directly with an OS, I have worked untill now on the application level, and/or in systems with super loop, and I am used to make assumptions like "nothing out of "while(1)" in the main function should get called more than once at system startup, or that is a sign of a reset"...correct me if I'm wrong


The main function is called just one time at startup, all the initialization must be done just one time. That mean that all code inside the main function before the while(TRUE) loop must be executed just once. After that, the code inside the while loop will be called periodically depending on the sleep time used and other threads and priorities.



It means that I have the correct baudrate set, and the main function in these cases behaves the same way in a superloop system would...

In this case IDK why my system behaves differently, but certainly it does, and I trust my oscilloscope...uffffff....will sort it out somehow, thanks for your investigations, it helps.

Regards,
Victor

User avatar
tfAteba
Posts: 422
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 55 times
Been thanked: 29 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby tfAteba » Sat Sep 23, 2017 9:20 am

Ok, to help you I need top know what exactly you changed in your project (Makefile, other files?)
Can you send it to me so that I can try to run it my side? It will be better to have your whole project if possible.

Thanks.

Also a note for next time. It will be better to make another post, the discussion is no more related to this post right now. Thanks.
regards,

Theo.

vctrvlad
Posts: 21
Joined: Mon Aug 28, 2017 2:27 pm
Location: Timisoara, Romania
Has thanked: 1 time
Been thanked: 3 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby vctrvlad » Sat Sep 23, 2017 8:38 pm

hi again, the demo works now, in my previous try, I had configured AtmelStudio to use cygwin for building instead of atmel tools.
As soon as I have replaced that, I got the correct behavior, with the test cases listed in the terminal.

The conclusion is yes, it was a system reset because of a wrong pointer while printing over uart the test report...

Thanks for your time Theodore, for trying out the demo for me.

Have a nice weekend,
Victor

vctrvlad
Posts: 21
Joined: Mon Aug 28, 2017 2:27 pm
Location: Timisoara, Romania
Has thanked: 1 time
Been thanked: 3 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby vctrvlad » Sat Sep 23, 2017 8:41 pm

tfAteba wrote:Ok, to help you I need top know what exactly you changed in your project (Makefile, other files?)
Can you send it to me so that I can try to run it my side? It will be better to have your whole project if possible.

Thanks.

Also a note for next time. It will be better to make another post, the discussion is no more related to this post right now. Thanks.


Hi, actually I wanted to ask, ,isn't there a better way to have these short discussions?an IIRC channel (I know, I like dinosaurs), or some other comunity IM solution?

It is a pain in the ass to open threads for every little mistake a newcommer do, don't you find it the same?
Regards,
Victor

User avatar
tfAteba
Posts: 422
Joined: Fri Oct 16, 2015 11:03 pm
Location: Chartres, France
Has thanked: 55 times
Been thanked: 29 times

Re: Atmel Studio - new project from Makefile error (shell related)

Postby tfAteba » Sat Sep 23, 2017 11:03 pm

Hi Victor,

You are welcome, it is a pleasure to help you and I'm happy to head that your problem is solved.

It is great to have some post in the forum, so when other beginners will have the same problem, they can look at the discussion and find the solution. That also why it is important to keep talking about one precise subject in a post.

Any way I also understand you some time it is better to have a real time discussion, so for that, there is an official IRC channel where I'm most of the time connected. The channel is named #chibios and I'm logged with my forum user name.
regards,

Theo.


Return to “AVR Support”

Who is online

Users browsing this forum: No registered users and 1 guest