Go Down

Topic: Why not (finally) expose main.cpp to the user ? (Read 4 times) previous topic - next topic

bubulindo


But why hide something that is SIMPLE ?


To you it is simple... for someone that just started in programming and embedded devices (which is probably the majority of Arduino users) main() makes a lot less sense than setup() and loop().

I can understand you. I only use the board and the bootloader from Arduino, but I also see why Arduino is made the way it is now. But the good thing is that it allows people to evolve and try different ways of using the hardware and software according to their own personal knowledge.
Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Jack Christensen


This came up in another thread as well - do you know how to download a sketch via the ICSP pins using the IDE?


Adding entries to boards.txt similar to below works for me (I have others that are just different clock freqs). Your programmer may vary ;-)

Code: [Select]
uno16.name=Arduino Uno ICSP @ 16MHz
uno16.upload.using=arduino:usbtinyisp
uno16.upload.protocol=stk500
uno16.upload.maximum_size=32256
uno16.upload.speed=115200
uno16.bootloader.low_fuses=0xff
uno16.bootloader.high_fuses=0xde
uno16.bootloader.extended_fuses=0x05
uno16.bootloader.path=optiboot
uno16.bootloader.file=optiboot_atmega328.hex
uno16.bootloader.unlock_bits=0x3F
uno16.bootloader.lock_bits=0x0F
uno16.build.mcu=atmega328p
uno16.build.f_cpu=16000000L
uno16.build.core=arduino
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

CrossRoads

So you replace

uno16.bootloader.file=optiboot_atmega328.hex

this file with the sketch file to use instead?
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.

madworm

@Nick:

That doesn't seem to work on 1.0 for me. I have to add the 'weak' attribute there.
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Nick Gammon

I don't have version 1.0.  I thought I had version 0022, but I suppose that is alpha, right?

I can't find version version 1.0 on the download page.

I wonder why version 0022 works? They don't have the weak attribute.

Go Up