Pumpkin Salvo-Lite RTOS example build problem

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't get any of the Salvo-Lite examples (version 4.2.0) for WinAVR to build, because of a missing file - tut5.c. Salvo support insists that the example is OK, but I can't get anywhere with it! Here is the web site:

http://www.pumpkininc.com/

If anyone has a few minutes to spare it would be nice if they could try it, and confirm that I'm not losing my marbles!

A prospective client of mine is using it for a motor control system, and I'd like to see how it performs.

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't see how to download 4.2.0, the download link I'm getting is:

http://www.pumpkininc.com/salvo/...
(that is 4.2.2rc3)

However it seems to suffer from the same problem. The first thing I found was that it has hard-coded C: pathnames in the .aps (I installed to D: then had to move it). As you say it flags tut5.c as being missing. I just used "remove file from project" to remove it and the other two files build but then the build ends with:

avr-gcc -mmcu=atmega16 -Wl,-Map=tut5lite.map salvomem.o tut5_board.o   -L"C:\Pumpkin\Salvo\Lib\GCCAVR"  -lsalvofgccavr-t  -o tut5lite.elf
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr5/crtm16.o:(.init9+0x0): undefined reference to `main'

because obviously the missing file was the one that contained main().

Seems like they've screwed up as tut5.c does not exist anywhere within the tree of files. The only .c files are:

C:\Pumpkin\salvo>dir *.c /s
 Volume in drive C is ACER
 Volume Serial Number is C6B0-75D7

 Directory of C:\Pumpkin\salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR

18/03/2008  20:46             2,416 tut5_board.c
               1 File(s)          2,416 bytes

 Directory of C:\Pumpkin\salvo\Example\AVR\ATmega16\AVR_Studio\Tut\Tut5\WinAVR

18/03/2008  22:31             2,419 tut5_board.c
               1 File(s)          2,419 bytes

 Directory of C:\Pumpkin\salvo\Example\AVR\ATmega2560\AVR_Studio\Tut\Tut5\WinAVR


06/06/2008  01:28             2,411 tut5_board.c
               1 File(s)          2,411 bytes

 Directory of C:\Pumpkin\salvo\Src

06/06/2008  01:28             5,897 salvomem.c
               1 File(s)          5,897 bytes

 Directory of C:\Pumpkin\salvo\Src\GCCAVR

06/06/2008  01:27             2,417 salvohook_interrupt_GCCAVR_GIE.c
06/06/2008  01:29             1,886 salvohook_wdt_GCCAVR_wdt_reset.c
               2 File(s)          4,303 bytes

Time to contact the authors methinks. It does seem kind of curious that no one has mentioned this to them if the fault existed in both 4.2.0 and 4.2.2-rc3.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Cliff.

That file you downloaded is the one I'm using.

I tried creating my own file with a main function in it, based on code in the user manual, but that didn't work.

Pumpkin is Andrew Kalman, and I've been in direct contact with him. He can't see that there is a problem, so I'll point him to this thread.

Andrew's father is the co-inventor of the Kalman filter, BTW.

It's a bit academic, as I've just found that my client is using the older version 3.2.4 of the software.

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm .. I just did a fresh test and am not having any of these problems.

1. Clean machine, that has AVR Studio v4.13 (we stay downrev to avoid project problems on the end-user side) and AVR-GCC running.

2. Installed Salvo 4 Lite for AVR 4.2.2-rc3 to C:.

3. Ran the tut5lite.aps project in the AT90S8515 tree (said tree has tut5.c in it). Results:

Build started 19.2.2011 at 10:42:35
avr-gcc.exe -I"C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR\Lite\." -I"C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR\Lite\..\..\..\..\..\..\..\..\Inc"  -mmcu=at90s8515 -Wall -gdwarf-2 -std=gnu99 -O0 -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT salvomem.o -MF dep/salvomem.o.d  -c  ../../../../../../../../../Src/salvomem.c

avr-gcc.exe -I"C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR\Lite\." -I"C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR\Lite\..\..\..\..\..\..\..\..\Inc"  -mmcu=at90s8515 -Wall -gdwarf-2 -std=gnu99 -O0 -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT tut5.o -MF dep/tut5.o.d  -c  ../../../tut5.c

avr-gcc.exe -I"C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR\Lite\." -I"C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR\Lite\..\..\..\..\..\..\..\..\Inc"  -mmcu=at90s8515 -Wall -gdwarf-2 -std=gnu99 -O0 -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT tut5_board.o -MF dep/tut5_board.o.d  -c  ../../tut5_board.c

avr-gcc.exe -mmcu=at90s8515 -Wl,-Map=tut5lite.map salvomem.o tut5.o tut5_board.o   -L"C:\Pumpkin\Salvo\Lib\GCCAVR"  -lsalvofgccavr-t  -o tut5lite.elf
avr-objcopy -O ihex -R .eeprom  tut5lite.elf tut5lite.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex tut5lite.elf tut5lite.eep || exit 0
avr-objdump -h -S tut5lite.elf > tut5lite.lss

AVR Memory Usage
----------------
Device: at90s8515

Program:    2484 bytes (30.3% Full)
(.text + .data + .bootloader)

Data:         58 bytes (11.3% Full)
(.data + .bss + .noinit)


Build succeeded with 0 Warnings...

4. You'll note that relative Include paths are used throughout, although an absolute library path is used.

5. We used to strip drive indicators out of paths of project files (like .aps and IAR EW project files) -- but that caused some other problems. So currently, we "normalize" all pathnames to c:\ if relative paths don't work.

6. For fun, I uninstalled Salvo Lite for AVR, deleted the Example/AVR directory, re-installed, and as above, it builds perfectly.

7. Lastly, a directory listing:

Volume in drive C is Local Disk
 Volume Serial Number is 74EA-7AC8

 Directory of C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5

06/05/2008  05:28 PM             2,870 tut5.c
               1 File(s)          2,870 bytes

 Directory of C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\ICCV7AVR

02/11/2008  06:09 PM             1,764 tut5_board.c
               1 File(s)          1,764 bytes

 Directory of C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5\WinAVR

03/18/2008  12:46 PM             2,416 tut5_board.c
               1 File(s)          2,416 bytes

 Directory of C:\Pumpkin\Salvo\Example\AVR\ATmega16\AVR_Studio\Tut\Tut5\ICCV7AVR

02/11/2008  06:05 PM             1,766 tut5_board.c
               1 File(s)          1,766 bytes

 Directory of C:\Pumpkin\Salvo\Example\AVR\ATmega16\AVR_Studio\Tut\Tut5\WinAVR

03/18/2008  02:31 PM             2,419 tut5_board.c
               1 File(s)          2,419 bytes

 Directory of C:\Pumpkin\Salvo\Example\AVR\ATmega2560\AVR_Studio\Tut\Tut5\ICCV7AVR

02/11/2008  06:47 PM             1,766 tut5_board.c
               1 File(s)          1,766 bytes

 Directory of C:\Pumpkin\Salvo\Example\AVR\ATmega2560\AVR_Studio\Tut\Tut5\WinAVR

06/05/2008  05:28 PM             2,411 tut5_board.c
               1 File(s)          2,411 bytes

     Total Files Listed:
               7 File(s)         15,412 bytes
               0 Dir(s)   7,842,881,536 bytes free

So, I'm not sure what is going on on your end, but tests here show that all the files that should be there are present, and it builds nicely in AVRStudio + AVRGCC (and ICCAVR, too -- I just tried it).

--Andrew

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Andrew.

tut5.c was definitely missing from my files, and from the ones Cliff installed. I downloaded the demo several times. Did you actually download 4.2.2-rc3 for your test, or are you using your local copy? The file might have been omitted from our version. We only downloaded the one file, for AVR-gcc, should we have downloaded the other files as well?

If you can email tut5.c to me it will probably solve the problem.

We are both using Studio 4.18. I don't think that anyone uses 4.13 any more.

Leon Heller G1HSM

Last Edited: Sat. Feb 19, 2011 - 09:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yup as Leon says I showed all the *.c that has been installed on my machines and tut5.c most definitely is not there in salvo-lite-avr-4.2.2-rc3.exe

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Yup as Leon says I showed all the *.c that has been installed on my machines and tut5.c most definitely is not there in salvo-lite-avr-4.2.2-rc3.exe
Yep, I installed from the one available to all, on-line.

Question -- did you deselect any of the Salvo plugins when you ran the installer?

We're all running the same executable, and I'm getting that file.

Note that you can use 7-Zip to extract files from the installer -- it's an NSIS file. Tut5.c is in there ...

This is the executable, that contains the file: http://www.pumpkininc.com/salvo/lite/avr/4/salvo-lite-avr-4.2.2-rc3.exe

Last Edited: Sat. Feb 19, 2011 - 09:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I switched off the IAR and ICC options as I don't use those compilers. The two options I left selected were "AVR-GCC" and "core". I'd already deleted the files but I just ran it again with all 4 options selected and now I find:

C:\Pumpkin\Salvo>dir tut5.c /s
 Volume in drive C is ACER
 Volume Serial Number is C6B0-75D7

 Directory of C:\Pumpkin\Salvo\Example\AVR\AT90S8515\AVR_Studio\Tut\Tut5

06/06/2008  01:28             2,870 tut5.c
               1 File(s)          2,870 bytes

So it's one of ICC or IAR that is required for the install to work for avr-gcc. Most odd. I doubt many avr-gcc users are likely to leave the IAR and ICC options ticked.

Suggest you rebuild the installer with the sub-package lists corrected.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll try installing it with the other options selected.

Leon Heller G1HSM

Last Edited: Sat. Feb 19, 2011 - 09:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, that explains it -- the GCCAVR plugin is missing that particular file. I have now identified and fixed the problem in the NSIS file -- the GCCAVR plug was missing the line to include tut5.c. The other two plugins have it.

We'll release an update with that fixed, in the future. I want to address some concerns about newer versions of GCCAVR as well before doing so ...

Thanks for the heads-up.

--Andrew

Last Edited: Sat. Feb 19, 2011 - 09:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's what we've been saying all along! :)

I'm glad we've got it resolved, at last.

I tried installing it with all the options enabled and the file is still missing! :( It isn't in the other plug-ins.

The uninstaller is broken, as well. I always have to delete everything manually.

Leon Heller G1HSM