Initially tried outdated MBI instructions, fail (lots of problems)
Next built toolchain manually using latest (4.6.3), fail prog_uchar
again using 4.6.2, fail prog_uchar
Next built toolchain using Jorg's scripts (4.5.1), fail stdint.h ..
added -D__STDC_HOSTED__=0 now fails atomic.h
Can anyone offer suggestions on how to get a working toolchain on
32-bit linux that will compile G3Firmware?
john d
Next built toolchain manually using latest (4.6.3), fail prog_uchar
again using 4.6.2, fail prog_uchar
I followed the MBI instructions and didn't have any issues under Ubuntu:apt-get install gcc-avr avr-libc avrdude scons git-core
Interesting to learn. I have a spare Gen3 extruder I bought as a bare
board when such things were still possible to buy. Since I still run
CupCakes, this news makes me want to consider stuffing that board with
a 328P for some headroom.
I'm surprised to hear there's a substantial difference in compiled
code size from one version of avr-gcc to another. A few bytes? Sure.
Doesn't fit? That's different.
Since I haven't compiled firmware from source in a couple of years, I
have to ask - how close to the limit _is_ the Gen3 firmware? What
about using a different bootloader to release some space? (ISTR
there's a newer bootloader that's 500ish bytes vs 2K for the
traditional one). What about abandoning the bootloader entirely and
requiring an ISP programmer? I know all Gen3 owners have a USB-TTL
cable and can reprogram their firmware via serial if there's a viable
bootloader, but a $20 USBtinyISP is a lot cheaper than replacing the
board.
> I'm using gcc V4.6.2, but my environment is mac not linux. I had to
> compile the toolchain
> from scratch and fix a couple of compiler issues to be able to build.
I had to do that when I was developing on and running the CupCake from
a CentOS laptop last year - it took me quite a bit of time to get
avr-gcc working from source - far longer than I would have predicted.
-ethan
No. Not required, but given the hassles I remember from a few years
back, when CupCake firmware changed every few weeks, users had a wad
of problems updating their firmware.
No bootloader means that you can not use the USB-TTL cable to update
your firmware over the serial interface. That's it. It has no
bearing on the payload code itself.
> Could you disregard the bootloader and burn firmware directly...
Yes.
> with a $5.00 mcu programmer then just run?
$5? What programmer are you recommending? I can build an uber-cheap
parallel port programmer that avrdude can drive, but then I have
nowhere to plug that into a modern laptop.
If you have a suggestion better than this...
http://www.ladyada.net/make/usbtinyisp/
... I would love to learn about it (I already own a USBtinyISP and
have recommended to several friends who do Arduino work that they get
one as well).
I detest the fact that hardware vendors dropped "legacy ports" years
ago, but nobody asked me what I thought.
-ethan
Really? I'm surprised to hear that. I thought some of us were
experimenting with ISP-loaded (no bootloader) firmware in 2009 or
2010. Perhaps I've misremembered what we were fiddling with, but I
was definitely using my USBtinyISP to inject code. I've even recycled
spare extruder controllers as RGB LED controllers (because they have 3
built-in 12V MOSFET channels and screw terminals). I used no unusual
compile-time flags, no unusual init code, and I dropped the code right
on the Extruder controller with a USBtinyISP and avrdude - no
bootloader.
> This is a work-in-progress that I have had to put on the back burner, but
> it’s working for me (most of the time, at least):
>
> https://github.com/giseburt/Optiboot-for-Makerbot
Interesting.
> I have only really tested it on the Gen3 and Gen4 EC, as far as I recall.
I will have to have a deep look at that.
> Now, to get it to work, you have to kinda trick scons a little:
>
> scons platform=ecv22 baud="115200 -F" port=/dev/tty.usbserial-* upload
>
> You’ll need to change the port for your OS, but note that there is a space
> in quotes … that’s required. Optiboot looses the ability to verify the chip
> type, so you need avrdude to have a -F on the command, and I’ve found that
> above is the easiest way.
Easy hack as long as it's mentioned some place what it's for, in case
people forget or to help new people figure out why it's there.
Thanks for sharing the Optiboot stuff.
-ethan
> getting rid of the snake game would probably free a few bytes …
Well, if I could play it WHILE printing, then maybe it would have
some value. Or, if it actually played out in real life on my
printer. (Maybe with some real obstacles to the extruder nozzle
like hitting the wiring harness connector.)
Dan
On Wednesday, March 7, 2012 at 12:17 PM, sto...@gmail.com wrote:
@ Jetty,
Re: Non-programmers
Yes, that's why I aimed at you and Rob and the other coders posting. I was curious - while you are re-writing if it would be more flexible to chuck the bootloader work your code. Then debug and optimize with some head room.
@ All others
Q.: Couldn't code be generated to use external memory, read/write? Then a daughter add on could become part of the mix?
----- Reply message -----
From: "Jetty" <clell...@gmail.com>
Date: Wed, Mar 7, 2012 12:58 pm
Subject: [MakerBot] Re: help setting up toolchain
To: "MakerBot Operators" <make...@googlegroups.com>
Yes you could, you'd probably have to change the starting addresses
for the code, but that's a pretty minor change.
However it would make it difficult for non programmer owners.
> Say, to you hard core coders and compiling types. Do you know if the bootloader is actually required to run YOUR bots? Could you disregard the bootloader and burn firmware directly with a $5.00 mcu programmer then just run?
--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To post to this group, send email to make...@googlegroups.com.
To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.
--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To post to this group, send email to make...@googlegroups.com.
To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.
On Wednesday, March 7, 2012 at 12:43 PM, sto...@gmail.com wrote:
@ jetty
Re: bootloader
Disclaimer: noob hackin
Hmmm. For several months I'd read that the bootloader is for IDE access not programs. I'd also understood that historically the bootloader causes a delay in running aps which the Optiboot sped through. I'd also read if no bootloader your application just runs. This is how commercial/consumer embedded applications are used in manufactured goods. No?
Many online instructions allude to - if you have the tools you just program the mcu chip. I think I burned a combined fade LED, blink LED, and waive servo sketch w/o boatloader. It was a few months ago and I was playing with my new expensive ($5.49) USBISP programmer on bread board aurduinos (ATmega328P). Instructions on the web state bootloader isn't needed if you do not need to use the IDE.
Disclaimer 2: The above was noob hackin recollections from a blur of lots of new mind numbing cool things and technologies. Maybe, I need to experience it all again? Meaning - I forget and might remember wrong. ;-)
----- Reply message -----
From: "Jetty" <clell...@gmail.com>
Date: Wed, Mar 7, 2012 1:28 pm
Subject: [MakerBot] Re: help setting up toolchain
To: "MakerBot Operators" <make...@googlegroups.com>
No, you can't do that.
A bootloader's job is to "maybe" initialize a few things, delay a
little watching for an incoming program upload, write that
program upload to flash, and if there isn't one, execute the program
on flash.
So, if you dump the boot loader, don't expect the software to still
run without some alteration, because what's calling the main program?
I.E. You need both unless you make changes to allow for there being no
boot loader.
See this: http://arduino.cc/en/Hacking/Bootloader?from=Main.Bootloader
However in reality, bootloaders make life easier, and they'd be the
last thing to dump, only if code optimizations didn't surfice.
>I used no unusual
>compile-time flags, no unusual init code, and I dropped the code right
>on the Extruder controller with a USBtinyISP and avrdude - no
>bootloader.
--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To post to this group, send email to make...@googlegroups.com.
To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.
--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To post to this group, send email to make...@googlegroups.com.
To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.
On Wednesday, March 7, 2012 at 1:15 PM, sto...@gmail.com wrote:
@ whosa
Ahhh. OK.
I just remember years ago I wanted to repartition my giant 1GB HD and then use other and different FSs to load another operating system. Some hotshots I knew then said it was impossible because of ??? Anyway a few months later I bought an unknown 'Partition Magic' (only on OS2 - a better OS) and was good with repartitioning on the fly and running OS2, windoze 3.11 and later Solaris - Intel.
Oh well. It was just a thought since ATmega can R/W data to SD I guessed it could be tricked to work some remote RAM.
Thanks.
----- Reply message -----
From: "Whosawhatsis" <whosaw...@gmail.com>
Date: Wed, Mar 7, 2012 3:22 pm
Subject: [MakerBot] Re: help setting up toolchain
To: <make...@googlegroups.com>
Cc: "Jetty" <clell...@gmail.com>
IIRC, these microcontrollers use a Harvard architecture which makes that impossible. You would need a Von Neumann architecture to execute code from external memory like that.On Wednesday, March 7, 2012 at 12:17 PM, sto...@gmail.com wrote:
@ Jetty,
Re: Non-programmers
Yes, that's why I aimed at you and Rob and the other coders posting. I was curious - while you are re-writing if it would be more flexible to chuck the bootloader work your code. Then debug and optimize with some head room.
@ All others
Q.: Couldn't code be generated to use external memory, read/write? Then a daughter add on could become part of the mix?
----- Reply message -----
From: "Jetty" <clell...@gmail.com>
Date: Wed, Mar 7, 2012 12:58 pm
Subject: [MakerBot] Re: help setting up toolchain
To: "MakerBot Operators" <make...@googlegroups.com>
Yes you could, you'd probably have to change the starting addresses
for the code, but that's a pretty minor change.
However it would make it difficult for non programmer owners.
> Say, to you hard core coders and compiling types. Do you know if the bootloader is actually required to run YOUR bots? Could you disregard the bootloader and burn firmware directly with a $5.00 mcu programmer then just run?
--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To post to this group, send email to make...@googlegroups.com.
To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.
--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To post to this group, send email to make...@googlegroups.com.
To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.
> Do you think it was to assure an 'all off' during a firmware upgrade?
The pins to the heaters and (early on) to the DC motor needed to be
controlled during a firmware update.
I ran the EC without a bootloader for a while, and that's when I
learned that some of the pins were never setup on the main firmware. I
corrected it and makerbot merged the changes in, but that's been at
least a year ago and many things have changed.
-Rob
>
And space and processing cycles for the snake game so that
it can be taken off of the motherboard freeing up space for
more amazing new features. (Or maybe a two player
version with networking over the rs485 cable?)
Dan