[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4792: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4793: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
AutoQuad Forum • View topic - Code and dev environment

Code and dev environment

News, Setup, Compiling, Flashing, Development

Re: Code and dev environment

Postby Max » Sun Nov 18, 2012 11:45 pm

I'd go ahead and "cheat" and look in the CW inc and lib folders... :) But almost all that seems to be typical gcc/arm stuff. My Yagarto install has a similar-looking includes folder, and the ARM libs I did download from somewhere else, though can't remember where now.

The unique things from Rowley seem to be the STM32 startup and linker files (they're in the STM32 folder provided by Rowley -- STM32_Startup.s and STM32f4.ld). The startup certainly has some CW-specific stuff in there, for example the "STARTUP_FROM_RESET" stuff which only works with CW debugger (Google that for explanation). I have not tried different startup or linker files or know what else may be unique in there, if anything. I'm not qualified to start mucking about in there yet... ;)

The .map file is created at compile-time (only if it doesn't exist?), so that -Map switch is just the file name to be used. As far as I can tell.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Code and dev environment

Postby srinath » Tue Nov 20, 2012 6:30 am

Hi Max

I get this error on running make
The problem line is this
$(CC) -fmessage-length=0 $(COMPILE_OPTS) $(INCLUDES) $(VARS) -MD $(basename $@).d -MQ $@ -quiet $< -o $(basename $@).lst

The error is
arm-none-eabi-gcc: error: 1wire.d: No such file or directory
arm-none-eabi-gcc: error: unrecognized command line option '-quiet'
make: *** [1wire.o] Error 1
What are .d files? Is that some eccentricity of the Rowley crosscompiler? I thought they used the same arm-none-eabi-gcc compiler (What a strange name)

I renamed the .d in the above line as a .c and removed the -quiet option.
Compilation starts but it seems i am missing a header file. Did you have this problem? Where is the header file system_stm32f4xx.h ?
In file included from aq.h:37:0,
from digital.h:22,
from 1wire.h:22,
from 1wire.c:19:
stm32f4xx.h:241:30: fatal error: system_stm32f4xx.h: No such file or directory
compilation terminated.



Regards
Srinath
srinath
 
Posts: 1028
Joined: Mon Jun 25, 2012 5:47 pm

Re: Code and dev environment

Postby Max » Tue Nov 20, 2012 7:26 am

Hi Srinath,

-MD is a preprocessor option that generates dependency output files... http://www.rowleydownload.co.uk/arm/doc ... ation.html But I'm not sure what those files are used for.

I can't find what the -quiet switch is supposed to do. :? http://www.rowleydownload.co.uk/arm/doc ... /index.htm

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Code and dev environment

Postby srinath » Tue Nov 20, 2012 7:31 am

Hi Max

I renamed the .d in the above line as a .c and removed the -quiet option.
Compilation starts but it seems i am missing a header file. Did you have this problem? Where is the header file system_stm32f4xx.h ?
In file included from aq.h:37:0,
from digital.h:22,
from 1wire.h:22,
from 1wire.c:19:
stm32f4xx.h:241:30: fatal error: system_stm32f4xx.h: No such file or directory
compilation terminated.

Srinath
srinath
 
Posts: 1028
Joined: Mon Jun 25, 2012 5:47 pm

Re: Code and dev environment

Postby Max » Tue Nov 20, 2012 7:41 am

system_stm32f4xx.h is in the "STM32/includes" folder, aka the CMSIS libraries -- the core_*.h files and stm32f4xx.h and the system_stm32f4xx.h. I found them in my disco board d-load package.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Code and dev environment

Postby srinath » Tue Nov 20, 2012 7:53 am

Yeah you are right, i forgot to place the STM32 directory in the onboard code folder.
So compilation proceeds some more (still only 1wire.c) and i get the following multiple definition errors

/home/srinath/Dropbox/autoquad-read-only/onboardTest/1wire.c:136: multiple definition of `owWriteBit0ISR'
/tmp/ccvQPCVv.o:/home/srinath/Dropbox/autoquad-read-only/onboardTest/1wire.c:136: first defined here
And similar errors. Any clue as to what is happening?

Srinath
srinath
 
Posts: 1028
Joined: Mon Jun 25, 2012 5:47 pm

Re: Code and dev environment

Postby Max » Tue Nov 20, 2012 8:01 am

Hmm, no, but "I renamed the .d in the above line as a .c" that doesn't sound right. If your gcc doesn't understand -MD then maybe remove it or replace it with something it understands... Sorry, out of my depth at this point. :)

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Code and dev environment

Postby nikivan » Tue Nov 20, 2012 8:41 pm

nikivan
 
Posts: 78
Joined: Wed Jul 04, 2012 12:32 pm

Re: Code and dev environment

Postby Max » Wed Nov 21, 2012 11:38 am

Nick, OK, I'll put something together. I think I can leverage other online guides as a basis. I'll make a separate post about compiling on Windows (first step to do anyway).

Srinath, have you gotten any further with GNU gcc? What compiler are you using? Have you seen this: http://www.rowley.co.uk/crossworks/gpl_sources.htm Their patch file seems pretty minor. Also, -MD should work in GNU gcc: http://gcc.gnu.org/onlinedocs/gcc-4.1.2 ... tions.html

I looked into the dependency thing (.d files) and while that makefile does generate the dependency files, it doesn't use them. So for example if you modify a header file and re-run make, it won't pick up the change. Which is the whole point of generating the .d files.

Here's a new Makefile which I'm using which fixes that. It's got a bunch of options but the basics are the same (drop into "onboard" folder, set CC_PATH to Crossworks folder, and run "make" from term/cmd inside the "onboard" folder). The only setup difference is that it's expecting the "STM32" folder to be at the same level as "mavlink" and "onboard," not inside "onboard" like the previous makefile. By default this will produce output in a folder called "Release" at the same level as "onboard," et. al.

This makefile works in Linux and Windows (and presumably OSX). For Windows you need a make.exe, for example from as I mentioned above, or Cygwin. I'll try to post a step-by-step later.

EDIT: The CW compiler works w/out the rest of the IDE installed. You can even move the gcc, lib, and include folders from inside the CW install folder to somewhere else and un-install CW.

-Max
Attachments
AQ-Makefile-112112.zip
(2.91 KiB) Downloaded 851 times
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: Code and dev environment

Postby srinath » Wed Nov 21, 2012 6:47 pm

Hi Max

I get the following error when i run the Makefile
arm-none-eabi-gcc: error: unrecognized command line option '-quiet'
arm-none-eabi-gcc: error: ../Release/obj/1wire.d: No such file or directory
make: *** [../Release/obj/1wire.o] Error 1
I seem to be using the same GNU compiler as crossworks but i don't know why i keep getting these errors.

Srinath
srinath
 
Posts: 1028
Joined: Mon Jun 25, 2012 5:47 pm

PreviousNext

Return to AQ Firmware

Who is online

Users browsing this forum: No registered users and 21 guests

cron