Show Posts
Pages: [1] 2 3 ... 516
1  Using Arduino / Microcontrollers / Re: Building ATMEGA32U4 bootloader and pin 13 behavior on: September 18, 2014, 09:49:09 am
Update:

Using the solution I provided above (link to a file to replace mysys-1.0.dll) and compiling in command line prompt cmd.exe under c:\system\SysWOW64\ worked. When I was compiling earlier, I was using cmd.exe in c:\system\System32. The two are different. I was using this one in win 7 but it worked without the .dll replacement. It must be the difference between win 8.1 and win 7/8. I spent a large part of the evening fighting this problem and didn't have time to compare the complied binary with the one I compiled in win7.
2  Using Arduino / Microcontrollers / Re: Compiling caterina bootloader in win 8.1 on: September 18, 2014, 08:57:25 am
Update:

Using the solution I provided above (link to a file to replace mysys-1.0.dll) and compiling in command line prompt cmd.exe under c:\system\SysWOW64\ worked. When I was compiling earlier, I was using cmd.exe in c:\system\System32. The two are different. I was using this one in win 7 but it worked without the .dll replacement. It must be the difference between win 8.1 and win 7/8. I spent a large part of the evening fighting this problem and didn't have time to compare the complied binary with the one I compiled in win7.
3  Using Arduino / Microcontrollers / [SOLVED-maybe]Compiling caterina bootloader in win 8.1 on: September 18, 2014, 12:07:45 am
Has anyone experienced errors compiling caterina bootloader in win 8.1? My errors are:
Code:
     0 [main] sh 6744 sync_with_child: child 8804(0x160) died before initializa
tion with status code 0xC0000142
    224 [main] sh 6744 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
      0 [main] sh 3188 sync_with_child: child 5344(0x160) died before initializa
tion with status code 0xC0000142
    318 [main] sh 3188 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable

I tried a few solutions found online and none worked such as this:

http://www.avrfreaks.net/forum/windows-81-compilation-error?name=PNphpBB2&file=viewtopic&t=137881

I was able to build on a win 7 machine at work.
4  Using Arduino / Microcontrollers / Re: Building ATMEGA32U4 bootloader and pin 13 behavior on: September 17, 2014, 11:51:03 pm
hiduino,

Thanks. I have tried on my home computer with win 8 without joy. I can't compile the bootloader. I could when I was using work computer running win 7.

Some error code:

Code:
      0 [main] sh 6744 sync_with_child: child 8804(0x160) died before initializa
tion with status code 0xC0000142
    224 [main] sh 6744 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
      0 [main] sh 3188 sync_with_child: child 5344(0x160) died before initializa
tion with status code 0xC0000142
    318 [main] sh 3188 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable

After some research I think it is an issue with some versions of windows, such as 8.1 on my home machine. I tried a few things but none worked.

Just in case, this worked for some people:

http://www.avrfreaks.net/forum/windows-81-compilation-error?name=PNphpBB2&file=viewtopic&t=137881

I will have to do this development on my work computer then. Win 8.1 has broken quite a lot of things. I'm glad I have a win 7 machine at work.
5  Using Arduino / Microcontrollers / Re: Building ATMEGA32U4 bootloader and pin 13 behavior on: September 17, 2014, 12:38:49 pm
Thanks for continuing to help me here! I really appreciate it.

I am trying to add that SerialUSB together with my bootloader so my device will have the Serial to talk to a PC. I looked at the bootloader I build and Caterina-Micro.hex.

There are 32 bytes per line in Caterina-Micro.hex, it has the 4832 byte in the front, empty space in the middle and bootloader in the last 4KB. I can understand all those in theory with intel hex format.

My build has 16 byes per line, no problem. It only has the 4KB bootloader, and a line to indicate the execution starts at 0x7000

Code:
:040000030000700089

The Caterina-Micro.hex doesn't have this line though. If I were to combine the hex files to add the 4832 bytes to my bootloader, should I keep this line?

The bootloader detaches USB after it ends so I worry that without SerialUSB code the Arduino IDE may not have access to the chip.
6  Development / Other Software Development / Re: How about including an "XLoader" program in arduino distribution? on: September 17, 2014, 12:02:27 pm
Thanks Riva. I'll give that a try. Meanwhile someone else nice enough is sharing his/her code of a similar program here:

http://forum.arduino.cc/index.php?topic=267244.msg1884324

I was able to build the project. This is probably better than having to work around a binary to make more out of it. This project has source code that can be modified and the goal of the author includes simple look (no need to select a bunch of MCUs or firmware, everything is fixed, good for a gadget's end user).
7  Using Arduino / Microcontrollers / Re: ATMEGA32U4 pin 13 behavior on: September 17, 2014, 11:43:55 am
hiduino,

Thank you! More karma!

I followed your steps and some online tutorial:

http://galvant.ca/how-to-compiling-arduino-caterina-with-new-vidpid/

I finally got the bootloader built. It is only 4K of code. So can you safely say that once I upload even a blink sketch, the 4,832 bytes of USB handler will appear on the MCU?

I bet the large 32KB "bootloader" is just to have both bootloader and a short blink with the 4,832 bytes so the OS will register the device or something else?

I'll try this bootloader tonight when I get home.

Now I suspect if I don't have the 4,832 bytes, after bootloader finishes, my device handlers are gone and I might not be able to upload? If this doesn't work, say the comm port is not showing up, how do I add the 4,832 bytes to the bootloader?
8  Using Arduino / Microcontrollers / Re: How to Update Firmware on Your Arduino Project on: September 17, 2014, 09:47:24 am
TheokieZA,

I was able to compile and run your project using netbeans. I used netbeans a bit some years ago and had a hard time adding the jssc 2.6.0 library but finally found the right way to do it. An instruction on how to do that will help many people.

I am not really familiar with the programming style you used to create the window. It seems like xml style. Is there a name for this type of programming? I am more used to older styles of Java Swing, creating and initializing items using Java statements, instead of describing the look with xml.

Again thank you very much! I saw the donation link. I'll make a donation after I get a hang of how to use your program.
9  Using Arduino / Microcontrollers / Re: ATMEGA32U4 pin 13 behavior on: September 17, 2014, 12:57:29 am
I tried make all using just Arduino IDE's included make in avr but it didn't work:

Code:
..\..\..\tools\avr\utils\bin\make all
makefile:153: ../../../../../../LUFA/LUFA-111009/LUFA/makefile: No such file or directory
The system cannot find the path specified.
The system cannot find the path specified.
make: *** No rule to make target `../../../../../../LUFA/LUFA-111009/LUFA/makefile'.  Stop.
10  Using Arduino / Microcontrollers / Re: ATMEGA32U4 pin 13 behavior on: September 17, 2014, 12:34:29 am
Thank you hiduino! You are a bootloader expert! I wish the forum gives out badges for different expertises.

Following your explanation I found these in caterina.h

Code:
#define L_LED_OFF() PORTC &= ~(1<<7)
#define L_LED_ON() PORTC |= (1<<7)
#if DEVICE_PID == 0x0037 // polarity of the RX and TX LEDs is reversed on the Micro
#define TX_LED_OFF() PORTD &= ~(1<<5)
#define TX_LED_ON() PORTD |= (1<<5)
#define RX_LED_OFF() PORTB &= ~(1<<0)
#define RX_LED_ON() PORTB |= (1<<0)
#else
#define TX_LED_OFF() PORTD |= (1<<5)
#define TX_LED_ON() PORTD &= ~(1<<5)
#define RX_LED_OFF() PORTB |= (1<<0)
#define RX_LED_ON() PORTB &= ~(1<<0)
#endif

So essentially can I use the following to nullify the effect of the L_LED_ON()?

#define L_LED_ON()

or

#define L_LED_ON() {}

I guess I can nullify the RX and TX LED pins too and use them for I/O, right?

I wonder how to then compile the code. Any advice?
11  Using Arduino / Microcontrollers / Re: ATMEGA32U4 pin 13 behavior on: September 16, 2014, 09:54:43 pm
I observed the same behavior with a leonardo clone board. The LED on pin 13 flashes while sketch is uploaded. Does someone know what is driving this pin?

This is from the doc:
Quote
• ICP3/CLKO/OC.4A – Port C, Bit 7
ICP3: If Timer 3 is correctly configured, this pin can serve as Input Capture feature.
CLKO: When the corresponding fuse is enabled, this pin outputs the internal microcontroller
working frequency. If the clock prescaler is used, this will affect this output frequency.
OC.4A: Timer 4 Output Compare A. This pin can be used to generate a high-speed PWM signal
from Timer 4 module. The pin has to be configured as an output (DDC7 set “one”) to serve this
function.

I don't think any alt. functions were used so this behavior could be in the bootloader?
12  Using Arduino / Microcontrollers / Re: How to Update Firmware on Your Arduino Project on: September 16, 2014, 09:27:02 pm
Thank you so much! Set up some donation link already! (I'll do what I can)
13  Using Arduino / Microcontrollers / Re: flashing m328p au(smd) with optiboot stk500v2 failure on: September 16, 2014, 04:04:30 pm
I don't remember by heart but I thought next to DTR is arduino's TX, then RX, not the other way around, at least for sparkfun FTDI adapters.
14  Using Arduino / Microcontrollers / Re: How to Update Firmware on Your Arduino Project on: September 16, 2014, 03:55:03 pm
I'd be happy to test your code and give you feedback. As long as you are clear about who may use the program and to what extent (say bundle it with their arduino-based products), I'm OK to pay or donate. Arduino team should really make one for all of us.
15  Using Arduino / Project Guidance / Re: Serial buttons on: September 16, 2014, 03:40:47 pm
Assume you receive a character per button press, then check serial port in a while loop. Then use if statement to decide what submenu to print etc.
Pages: [1] 2 3 ... 516