Pages: 1 ... 6 7 [8] 9 10 ... 29   Go Down
Author Topic: Updating the mighty-1284p core  (Read 19533 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12894
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The bad news is WinDiff finds changes in nearly every file.  The good news is that the vast majority of the changes appear to be additions to the 1.0.5 standard core which should have no bearing on the '1284 processor or add new features.  I found just one "conflict" that should be easy to get past.
What is that conflict?

False alarm.  Sorry about that.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12894
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I came to a startling conclusion. Namely, the current 1.0.5 core (cores) files (i.e. arduino-1.0.5\hardware\arduino\cores\arduino) are sufficient to support the ATmega1284P the same as the current mighty-1284p core. I think all the necessary changes have worked their way into the cores files since 1.0.
It is surprising, if indeed this has been slipstreamed in, that there isn't any record of it, as suggested by RetroLefty. Who got the changes in, I wonder? These things don't just "happen"!

That appears to be exactly what happened starting about two years ago.  For example, here is the introduction of the analogReference constants...
https://github.com/arduino/Arduino/commit/eb380de9726d90d937f2d70d4b94bb60578316c7#diff-c826156f3b969283481ce550d55631a7

As far as I can tell David Mellis did the bulk of the work as part of adding the concept of "variants".

Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12894
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately I think the fix will require mods to wiring_analog.c which is disappointing because things were just so clean without the core files.

There is a high probability that changes like that can be merged into 1.5.x.  Christian has been especially amendable lately.   smiley-grin

I have no idea how he is with 1.0.5 changes but it's fairly easy to find out.

Quote
@Coding Badly -- you said something earlier that made me wonder, is there a straightforward way to include only those core files that need to be changed?

As far as I know, no.  A "core" is an all or nothing proposition.

Quote
It's no big shakes to include them all, it's only about 40 files to the tune of 200kB, but it would be more elegant to not have those files that are identical to the Arduino core.

I see two (complementary) ways to deal with the problem...
1. Get Christian to merge the changes.
2. Maintain a Github repository with the m1284 specific changes on a separate branch that's occasionally merged with the official core.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

#3: Just let me at wiring_analog.c  with my soldering iron?
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not quite following all the issues mentioned in this thread. However, I thought I'd comment, given my webpage was cited. I designed an ATmega 1284 pcb a little over a year ago, and have been using it since then on approx 90% of my projects. Love the chip, and not had any problems using IDE v.1.05 - my boards.txt file looks as follows:

##############################################################
tredicip.name=Tredici-1284P
tredicip.upload.protocol=arduino
tredicip.upload.maximum_size=130048
tredicip.upload.speed=115200
tredicip.bootloader.low_fuses=0xff
tredicip.bootloader.high_fuses=0xde
tredicip.bootloader.extended_fuses=0xfd
tredicip.bootloader.path=optiboot
tredicip.bootloader.file=optiboot_atmega1284p.hex
tredicip.bootloader.unlock_bits=0x3F
tredicip.bootloader.lock_bits=0x0F
tredicip.build.mcu=atmega1284p
tredicip.build.f_cpu=16000000L
#tredicip.build.core=arduino:arduino
tredicip.build.core=standard
tredicip.build.variant=tredici


FWIW, I discovered I had modified the page cited back in October, but never uploaded it. The new page includes section 10, regarding 1- 1/2 dozen libraries I had tried with the chip, and the various mods/etc I needed to make to use them.
http://www.ot-hobbies.com/resource/ard-1284.htm
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 535
Posts: 27048
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a bunch of Bobuinos out there.  On the order of 50-60 assembled kits & boards. I have 25 more kits ready to go, and am close to releasing a new version of the Original Bobuino with SD card, RTC, RS232 buffer for 2nd serial, some proto area to aid in adding RF modules, to ease assembly for my wife & I.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12894
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Adding a couple #defines seems mostly harmless. If there is a consensus among those participating in this thread, I'd be all for it. What format would work best?

There are two that will help transition to 1.5...

ARDUINO_ARCH_AVR is defined for AVR based boards

ARDUINO_AVR_{tag} is defined for the selected board where {tag} is the "board ID" (the text before the first dot from the boards.txt entries).  For example, for the Original Mighty 1284p 16MHz the board ID is MIGHTY which makes the #define ARDUINO_AVR_MIGHTY.  For the Bobuino board the #define is ARDUINO_AVR_BOBUINO.
« Last Edit: May 05, 2014, 03:12:28 am by Coding Badly » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12894
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Correct but remember that my diff file is Arduino 1.0 compared to...

Ah.  Got it.

Quote
But my aim was to understand the changes that maniacbug made to 1.0 to produce his core.

No sweat.  Just want to make certain nothing gets missed.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12894
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

#3: Just let me at wiring_analog.c  with my soldering iron?

 smiley-lol
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 830
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not quite following all the issues mentioned in this thread.

Arguably, far and away the most significant piece of take home info, is that you might want to try changing

#tredicip.build.core=arduino:arduino
tredicip.build.core=standard

to

tredicip.build.core=arduino:arduino
#tredicip.build.core=standard

and see how you go.

By some great sleuthing documented in this thread, it has been determined that almost all the important changes in standard "Mighty" core have since found their way into the standard Arduino 1.0.5 core.

Looks like some relatively minor tidying up still to be done, but the 1284p core will very soon be caught up to 1.0.5!


« Last Edit: May 05, 2014, 05:14:50 am by pico » Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1790
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a bunch of Bobuinos out there.  On the order of 50-60 assembled kits & boards. I have 25 more kits ready to go, and am close to releasing a new version of the Original Bobuino with SD card, RTC, RS232 buffer for 2nd serial, some proto area to aid in adding RF modules, to ease assembly for my wife & I.

I have no idea about the population of the Wayne Chu "Sleeping Beauty" board, but I recently came into 2 of these to go with my 3 Bobuinos.  Interestingly, the download of the support files from Wayne's site http://www.rasmicro.com/Sleeping_Beauty/ also downloads the Bobuinos profile too: In the ZIP the two boards share the same "standard" set of core files which, according to Readme, are sourced from http://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/
.

(I completely missed this connection until I saw two Bobduino listed  in my Arduino GUI boards list!)

Diff'ing the two core directories proved the core files are identical.
...\Documents\Arduino\hardware\maniacbug-SB-1284p\cores\
...\Documents\Arduino\hardware\mighty-1284p\cores\
Assumption... if Bobuinos are happy, the Sleeping Beauty should be happy, too.

Diff'ing the pins_arduino.h files is a PDF attached... just for completeness for anyone interested and unfamiliar with SB.

Ray


* 1284_core_compare.jpg (789.1 KB, 7260x5444 - viewed 21 times.)
* 1284_pins_arduino.pdf (63.2 KB - downloaded 19 times.)
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 830
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Diff'ing the two core directories proved the core files are identical.
...\Documents\Arduino\hardware\maniacbug-SB-1284p\cores\
...\Documents\Arduino\hardware\mighty-1284p\cores\
Assumption... if Bobuinos are happy, the Sleeping Beauty should be happy, too.

Ray,

The schematic for the SB shows a substantially different pin mapping for the SB compared to the Bobuino (I've attached a snip below). Are you saying that the SB folks are suggesting using the Bobuino pins_arduino.h file? If their published schematic is correct, that will never work...

But perhaps I am misunderstanding what you are saying.

Edit: OK, I see from your diff file you are aware the pins_arduino.h files are very different. But I still don't understand what you are getting at... just that the SB guys are using unmodified 1.0 core files, and have only written a new pins_arduino.h?


* sb-schematic.JPG (54.44 KB, 478x455 - viewed 25 times.)
« Last Edit: May 05, 2014, 11:39:04 am by pico » Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1790
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ray,
...
Edit: OK, I see from your diff file you are aware the pins_arduino.h files are very different. But I still don't understand what you are getting at... just that the SB guys are using unmodified 1.0 core files, and have only written a new pins_arduino.h?

So what I observed is that SB is shipping a set of core files that are identical to Bobduino and the only difference is that they have a unique pins_arduino.h ... the ZIP archive SB supplies includes a boards.txt file that also maps in the Bobduino board type and uses a common set of core files (excepting the aforementioned pins_arduino.h of which there are one for Bobduino and one for Sleeping Beauty.)  Said core files for Bobduino are same core files for Sleeping Beauty.
boards.txt as supplied by downloading SB support files:
Code:
##############################################################

bobuino.name=Bobuino
bobuino.upload.protocol=arduino
bobuino.upload.maximum_size=130048
bobuino.upload.speed=115200
# 0xfe = low power crystal, 16 MHz?
bobuino.bootloader.low_fuses=0xff // fe?
bobuino.bootloader.high_fuses=0xde
bobuino.bootloader.extended_fuses=0xfd
bobuino.bootloader.path=optiboot
bobuino.bootloader.file=optiboot_atmega1284p.hex
bobuino.bootloader.unlock_bits=0x3F
bobuino.bootloader.lock_bits=0x0F
bobuino.build.mcu=atmega1284p
bobuino.build.f_cpu=16000000L
#bobuino.build.core=arduino:arduino
bobuino.build.core=standard
bobuino.build.variant=bobuino

##############################################################
sleepingbeauty.name=Sleeping Beauty
sleepingbeauty.upload.protocol=arduino
sleepingbeauty.upload.maximum_size=130048
sleepingbeauty.upload.speed=115200
# 0xfe = low power crystal, 16 MHz?
sleepingbeauty.bootloader.low_fuses=0xf7 // changed by R.S.
sleepingbeauty.bootloader.high_fuses=0xde
sleepingbeauty.bootloader.extended_fuses=0xfd
sleepingbeauty.bootloader.path=optiboot
sleepingbeauty.bootloader.file=optiboot_atmega1284p.hex
sleepingbeauty.bootloader.unlock_bits=0x3F
sleepingbeauty.bootloader.lock_bits=0x0F
sleepingbeauty.build.mcu=atmega1284p
sleepingbeauty.build.f_cpu=16000000L
#sleepingbeauty.build.core=arduino:arduino
sleepingbeauty.build.core=standard
sleepingbeauty.build.variant=sleepingbeauty

##############################################################
I found it strange that SB in the ZIP would include the Bobduino and would encapsulate it within the Sleeping Beauty directory structure.  

Point is, if one already has a Bobduino installed as CrossRoads specifies, the SB installation will create two Bobduino entries.  But the cores files used by the two Bobduino entries is also the same core file used by Sleeping Beauty.  
Code:
C:\Users\owner\Documents\Arduino\hardware\maniacbug-SB-1284p>tree
Folder PATH listing for volume SYSTEM
Volume serial number is 0031002D 49E8:2F05
C:.
├───bootloaders
│   ├───optiboot
│   └───standard
├───cores
│   └───standard
├───examples
│   ├───MiscFunctions
│   ├───SleepingBeauty1284P
│   └───SpeakerFunctions
├───HexBackUp
└───variants
    ├───bobuino
    └───sleepingbeauty

C:\Users\owner\Documents\Arduino\hardware\maniacbug-SB-1284p>

core files installed by installing Bobduino as CrossRoads specifies:
Code:
C:\Users\owner\Documents\Arduino\hardware>tree mighty-1284p
Folder PATH listing for volume SYSTEM
Volume serial number is 49E8-2F05
C:\USERS\OWNER\DOCUMENTS\ARDUINO\HARDWARE\MIGHTY-1284P
├───1MBAUD_m1284
├───bootloaders
│   ├───optiboot
│   └───standard
├───cores
│   └───standard
└───variants
    ├───avr_developers
    ├───bobuino
    └───standard

C:\Users\owner\Documents\Arduino\hardware>

The files in ...\cores\standard are identical in both installations.

So, my thinking is that any core changes made to Bobduino and tested OK will also be OK on the Sleeping Beauty.  I am assuming here that the supplied pins_arduino.h file is excluded from this core refresh initiative.  It is my opinion that pins_arduino.h (or .c) are the board designer's responsibility - even if there are errors.  Of course, what I am looking for is an agreement on this premise of exclusion.

Ray
« Last Edit: May 05, 2014, 12:27:46 pm by mrburnette » Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you look in \variants\bobuino, you'll see the only useful file is pin_arduino.h (the .ods file is vestigial), and all it specifies is the chip pin to header mapping. This has nothing to with which boot loader is installed, or the basic functional compilation of code, only with the header mapping. The compilation business, and any differences, are specified in the boards.txt file.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So, my thinking is that any core changes made to Bobduino and tested OK will also be OK on the Sleeping Beauty.  I am assuming here that the supplied pins_arduino.h file is excluded from this core refresh initiative.  It is my opinion that pins_arduino.h (or .c) are the board designer's responsibility - even if there are errors.  Of course, what I am looking for is an agreement on this premise of exclusion.

The current bobuino/pins_arduino.h file from the refresh initiative is a combination of Crossroads' current file plus changes made by pico; it is not the same as in maniacbug's current mighty-1284p core. But more changes are coming as there are issues with the bobuino variant.

I do not intend to address additional boards in the refresh until we get an initial version out that supports the current three variants (avr_developers, bobuino, standard). After that I hope to add my Mighty Mini 1284P board and a 1MHz version of Optiboot; adding the Sleeping Beauty board is a possibility too if there is demand for it.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: 1 ... 6 7 [8] 9 10 ... 29   Go Up
Jump to: