Code Load Address

Can I specify the final code load address in the IDE and if so what is the syntax please?

Regards
Nom

AFAIK: no.
Why do you want to do this anyway?

A number of reasons:

  1. I am very unfamiliar with the Arduino environment and wish to learn;

  2. I am attempting to write a CAN firmware updater/boot loader;

  3. From other embedded development systems it is a simple process to define the load address.

Regards
Nom

"The Arduino environment" is about the ATmega microprocessors - that's I think where you should look mostly for this kind of in-depth things (from the way you write this I have the feeling you're far more ahead in the microprocessor/embedded world than your run-of-the-mill first-time poster).

In a nutshell (I'm sure people will flog me for this): Arduino is about the community & the software IDE (which can also be used to program other microcontrollers, such as the ESP8266).

The Arduino hardware is built mostly around the ATmega microprocessors - conveniently soldered on a board, or sometimes in a socket for easy removal, with all external components needed to make the microcontroller easy to work with, such as filter caps, input voltage regulator and USB interface.

For the questions at hand, you may actually be better off in the "Microprocessors" board, which discusses the microprocessors themselves. This "project guidance" board is mostly about everything but the microprocessor: how to hook things up and make it work.

WVmarle:

Thank you for your reply. I originally posted on another board, and it was moved here.
I'll go and have look on the board you suggest.

Regards
Nom

The code is loaded in the right place so that it is started after a reset. Why would you want to put code anywhere else where it won't start?

The Arduino bootloader is open-source. Have a look at how it works.

wvmarle:
with all external components needed to make the microcontroller easy to work with, such as filter caps, input voltage regulator and USB interface.

Not to mention some holes to jab wires into and an led. (Altho another 5V hole or 2 would be nice, as would another led or 2 and a few buttons :wink: )

And the indispensable RESET button. What would we do without it :slight_smile:

Some fixed buttons for inputs may be convenient (I for one never needed it but unused they don't get in the way of anything); I don't agree with more fixed LEDs as they occupy ports and may get in the way.

wvmarle:
I don't agree with more fixed LEDs as they occupy ports and may get in the way.

When it's buffered by an op amp as on the Uno, it's not really occupying a port. In fact, pin 13 is a SPI pin.

wvmarle, Kenwood, & Morgan,

All terribly interesting and indicative of your expansive knowledge, but,,, W T F does it have to do with the OP's question?

Nom,
All you are going to learn by figuring out how to modify the IDE to load your HEX to a different location is: how to screw up interrupt vectors, how to screw up the IDE, & how to waste your time. IMHO, of course.

wvmarle:
I don't agree with more fixed LEDs as they occupy ports and may get in the way.

In fact what I did recently was solder a 10xLED array to a bit of board, commoned the cathodes and put resistors on the anodes, with headers. So now it's easy to hook up a bunch of different coloured blinkenlites.

Also for buttons now I use one of these anyway. (They also make a 16x button 2-wire analog one.)

but,,, W T F does it have to do with the OP's question?

sfa. Relax.

123Splat:
wvmarle, Kenwood, & Morgan,

All terribly interesting and indicative of your expansive knowledge, but,,, W T F does it have to do with the OP's question?

As what happens more in threads where the answer has pretty much been given, the conversation sometimes drifts away. Nothing to worry about.

nom:
2. I am attempting to write a CAN firmware updater/boot loader;

For which processor?

AT90CAN128

Have you looked over the Optiboot source code / build process?

Yes I have and it seems like I should be able to get it to work.

I have found a thread dated Feb 2016 which is much the same as I am trying to do.

There were a couple of suggestions which I have followed up such as hardware.text and linker scripts.

At this stage, I don't know enough about how or when the IDE pulls these files during the compile/link process.

I would really like to use the IDE as there are a number of Arduino functions I would like to include without having to write my own (Totally lazy).

Regards
Nom

The IDE aource code is published - modify as appropriate for your application.

For example I've omitted the millis() function because it uses a bit of processor time for one project.

Allan