Go Down

Topic: UECIDE: A New Fork of the IDE (Read 61993 times) previous topic - next topic

majenko

#90
Jul 17, 2013, 08:11 pm Last Edit: Jul 17, 2013, 08:17 pm by majenko Reason: 1
Does it rely on the arduino "core" (i.e., wiring) files being there?  If not you could make a Cosa core which just contains the Cosa files and the compiler.

Or just add it in to the hardware/cores/avr105/cores/ardunio "might" work, but it may not compile as it's a subdirectory.  I don't think there's anything to recurse into the subfolders inside the core at the moment - I'll check.

Edit: Actually, yes, findFilesInFolder() recurses into the folder it's pointed at, and that's what's used to get the files in the core.

Edit 2: That path should read "hardware/cores/arv105/api" though it may change in future as it's down to the core.txt file to say where the api files go.

pito

#91
Jul 17, 2013, 08:37 pm Last Edit: Jul 17, 2013, 08:39 pm by pito Reason: 1
So the Cosa lib folder in
Code: [Select]
D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\libraries\Cosa

CosaBenchmarkPins example, and it builds for 6 seconds, then throws errors see attached.. promising, however..

majenko

How does this sound?

Compile a Cosa program *without modifying anyting but the sketch* - and that is just to add one line.

I have expanded the #pragma parameter system to affect compilation, so now you can add an extension to the core with:
Code: [Select]
#pragma parameter extension=/home/matt/git/Cosa
and that will be included in the -I list for include files, and compiled into the core.a library file.

I'll just push that up to the build server and build a new version for you.

Tom Carpenter

Oooh, it might come in handy if you could use the '#pragma parameter' to add other compiler flags (e.g. defining code sections)
~Tom~

pito

#94
Jul 17, 2013, 08:49 pm Last Edit: Jul 17, 2013, 09:24 pm by pito Reason: 1
:smiley-eek-blue: :smiley-eek-blue: :smiley-eek-blue:
CosaBenchmarkPins

Quote
Program Size:
 Flash: 18202 bytes
 RAM:   510 bytes


Unbelievable, fantastic !!

The only issue I have now is you generate the upgrade.zip as the last one, so I would kindly ask you to build it as the first one as I have no time to wait in order to download it..  :smiley-yell:

The new dimension of Universal Embedded Computing!

Code: [Select]
..105575f6e37/CosaCanvasST7735.elf] [C:\DOCUME~1\pito\LOCALS~1\Temp\build-..787b75f6e37/CosaCanvasST7735.hex]
Program Size:
 Flash: 19178 bytes
 RAM:   643 bytes


PS: it seems it compiles the Cosa lib each time, even within same session..

majenko

Yeah, the whole recompile thing needs looking at.  There is an option in the preferences to delete the old build before making the new build, but it rebuilds all the files manually regardless.  I need to add some timestamp checking in there so it only builds if it a) doesn't exist, or b) is newer than the object file.

Simple enough to add I guess.

majenko

Code: [Select]

[/home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/compiler/bin/avr-gcc] [-c] [-g] [-Os] [-w] [-fno-exceptions] [-ffunction-sections] [-fdata-sections] [-mmcu=atmega2560] [-DF_CPU=16000000L] [-DARDUINO=105] [-D_BOARD_MEGA2560_] [-I/home/matt/git/Cosa] [-I/tmp/build-0e9fa003-59f6-46df-be6d-9bf7ee60759a] [-I/home/matt/git/UECIDE/build/linux/work/hardware/boards/Arduino/mega2560] [-I/home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api] [-I/home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/libraries] [/tmp/build-0e9fa003-59f6-46df-be6d-9bf7ee60759a/CosaHD44780.cpp] [-o] [/tmp/build-0e9fa003-59f6-46df-be6d-9bf7ee60759a/CosaHD44780.cpp.o]
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/wiring_digital.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/wiring.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/wiring_analog.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/wiring_shift.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/wiring_pulse.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/avr-libc/malloc.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/avr-libc/realloc.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/WInterrupts.c as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/WMath.cpp as not modified.
Skipping /home/matt/git/UECIDE/build/linux/work/hardware/cores/avr105/api/USBCore.cpp as not modified.

How does that look... an improvement?

pito

Let's try, is that 0.5.3e?

majenko

0.5.3f - and yes, the upgrade builds first ;)

pito


majenko

So... anything else the #pragma parameter ... should be able to do?

At the moment you have
Code: [Select]

// Add am extension to the core
#pragma parameter extension=/foo/bar

// Auto-select this board when the sketch loads
#pragma parameter board=uno


They get parsed for specific items at sketch load time, and also parsed again at compile time for other options.

There's really no end of the things I could get it to do...

pito

#101
Jul 17, 2013, 10:41 pm Last Edit: Jul 17, 2013, 10:45 pm by pito Reason: 1
Fantastic!

now 6 seconds (before: 27 secs)

Code: [Select]
LOCALS~1\Temp\build-178f1cd3-7a04-4680-a39e-5179fc094e83\CosaCanvasST7735.cpp]
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\avr-libc\malloc.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\avr-libc\realloc.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\WInterrupts.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\wiring.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\wiring_analog.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\wiring_digital.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\wiring_pulse.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\wiring_shift.c as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\CDC.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\HardwareSerial.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\HID.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\IPAddress.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\main.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\new.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\Print.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\Stream.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\api\Tone.cpp as not modified.
....
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\libraries\Cosa\VWI\Codec\Block4B5BCodec.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\libraries\Cosa\VWI\Codec\ManchesterCodec.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\libraries\Cosa\VWI\Codec\VirtualWireCodec.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\libraries\Cosa\VWI.cpp as not modified.
Skipping D:\ProgramFiles\arduino\uecide-0.5.3c\hardware\cores\avr105\libraries\Cosa\Watchdog.cpp as not modified.
..
LOCALS~1\Temp\build-178f1cd3-7a04-4680-a39e-5179fc094e83/CosaCanvasST7735.hex]
Program Size:
 Flash: 19178 bytes
 RAM:   643 bytes

pito

#102
Jul 17, 2013, 10:49 pm Last Edit: Jul 17, 2013, 10:51 pm by pito Reason: 1
Now I have to add my cores (mighty1284p, mega32) and boards (mighty1284p variant, mega32). Do I need to edit something?

majenko

How does the mighty1284p differ from a normal arduino?  If it uses the same compiler (avr-gcc) and core (Arduno.h etc) then you don't need a new core, just a board.

The board folder contains the pins_arduino.h for the board, and a board.txt file that defines the board.  Take a look in an existing board for how it's formatted.

You don't need to edit anything to add a board, just place the folder in your sketchbook/boards folder and bob's your uncle.

Alternatively, zip the folder up, and use the "Add Boards..." menu entry to add it for you.

majenko

The board.txt file gets overlaid over the core.txt file (from the core), and the resultant combined file is used for the compilation.

Anything in the core.txt file can be put in the board.txt file to override it if you need it to work slightly differently for that board.

Or that's the theory anyway ;)

Go Up