Author Topic: Axon - New source code broken  (Read 4453 times)

0 Members and 1 Guest are viewing this topic.

Offline gizzerd91Topic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Axon - New source code broken
« on: December 31, 2008, 01:04:05 PM »
I just downloaded and installed the new (1.02) Axon source code. When I hit Rebuild All AVR Studio gave me a bunch of bugs. It said that in reset_timer_1, reset_timer_3, reset_timer_4, and reset_timer_5 (in SoR_Utils.h) there were undefined references to the timer1ClearOverflowCount, timer3ClearOverflowCount, timer4ClearOverflowCounter, and timer5ClearOverflowCount. It also said that in Axon.c on lines 51-53 there were undefined references to timer3Init, timer4Init, and timer5Init. It seems like the new timer system doesn't work. Normally I would comment it out, but I need PWM controls. I followed the instructions on the site exactly. When it didn't work the first time I deleted the Axon project in AVR and remade it. One thing that could be wrong is that the new 1.02 source code had no makefile, so I borrowed the one from 1.01, though I doubt that's the problem. What should I do, oh wise Admin?

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Axon - New source code broken
« Reply #1 on: December 31, 2008, 07:44:59 PM »
I've been having problems with getting the new source code to compile - it would start the build and never end. airman00 tried to fix it but ended up erasing all of his programming programs and reinstalling them. The source code must be cursed!

Offline gizzerd91Topic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: Axon - New source code broken
« Reply #2 on: January 01, 2009, 10:25:05 AM »
Admin, do you really not have a fix? If you don't, is it possible to do PWM with the old source code? If that's the case, how do you do it (as in example code), because I've been trying on and off for a couple weeks now and can't figure it out. I'm a decent coder, but I never formally learned C, so I'm kindof bumbling around this problem.

Offline Dscrimager

  • Full Member
  • ***
  • Posts: 57
  • Helpful? 0
Re: Axon - New source code broken
« Reply #3 on: January 01, 2009, 06:53:01 PM »
I had to get the old make file and include it. What I did was this:
- downloaded the old version and unzipped it
- downloaded the latest and unzipped it over it thus overwriting files that were included but leaving other items like the make file.
- changed the make file to point to the new timer file which is now timer640.c, it's a new target that has to be included for the items you mentioned to be found

see old and new below:
Code: [Select]
#SRC = a2d.c buffer.c uart4.c timerx8.c rprintf.c $(TARGET).c
SRC = a2d.c buffer.c uart4.c timer640.c rprintf.c $(TARGET).c

This cleared it up for me.

Doug

Offline gizzerd91Topic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: Axon - New source code broken
« Reply #4 on: January 02, 2009, 12:56:04 PM »
That got rid of the errors for me too. Very smart going. But... the code is now broken. The System initialize runs over and over again. The code doesn't stop at the while loops. Its like it creates a new thread every time it hits a while loop, then bravely charges on. How do I fix that problem?

Offline Dscrimager

  • Full Member
  • ***
  • Posts: 57
  • Helpful? 0
Re: Axon - New source code broken
« Reply #5 on: January 02, 2009, 07:11:08 PM »
Well, that I don't know without seeing the code. If it's C, I can probably read it. Post it and we'll see.
There aren't any threads in the platform used in the AXON that I am aware of(unless you are using a threading library that simulates them).
Are you sure you aren't getting resets due to low power or some other reason.
In any case, post the code, or what you care to, and maybe we can puzzle it out.

Doug

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Axon - New source code broken
« Reply #6 on: January 09, 2009, 04:26:55 AM »
Turns out I was dumb and somehow forgot to include the makefile in the latest release. It's been corrected.

I also released a v1.03 which I have verified works with the latest versions of gcc and AVR Studio. No other significant changes though.

Offline amscrplaya

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: Axon - New source code broken
« Reply #7 on: January 09, 2009, 11:44:47 PM »
I just downloaded the new source code and now I can not use control.c to write my program. The LED just pulses and when I hit the button to initiate my program, nothing happens. What can I do so that control.c works when I hit the button like the old source code?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Axon - New source code broken
« Reply #8 on: January 10, 2009, 12:12:25 AM »
hmmmm it appears the latest version of gcc broke the code . . . the Axon keeps restarting . . .

For now don't upgrade gcc (WinAVR) and use the older code versions until I can figure this out.

It seems to be acting as if the watch dog timer is turned on or something as I can't seem to pinpoint where in code its causing the hardware reset . . .

Appears I'll need to retest all my code with every gcc release . . .

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Axon - New source code broken
« Reply #9 on: January 11, 2009, 06:57:51 AM »
arg, turning out to be harder than I thought . . . I opened up a new thread:
http://www.societyofrobots.com/robotforum/index.php?topic=6468.0

 


Get Your Ad Here