Hi everyone. I have a feeling that this might be more of a hardware than software issue but here goes.
I built a custom board for a chip which has Arduino support (based on CT_ARM: here CT-ARM User's Manual - Google Docs
They released the design online so I ordered the PCB later based on it. It looks exactly the same with the board I have. Cytron has dicontinued the board.
It's a Nuvoton chip, NUC131L2DAE.
Now, the program I developed for it took me 2 years and let's say I just couldn't bear writing new code for it. So I wanted to stick to the Arduino code rather than using their IDE (it's called KAEL).
Now, I've been able to load the code via ICSP from a working Nuvoton chip of the same model into the new board I built using their bootloader called NuLink. I loaded a simple "ADC to Serial" program, and I could read the serial port perfectly well from the newly built board.
However, I couldn't PROGRAM the board from the COM Port. Here's the error:
Sketch uses 4328 bytes (6%) of program storage space. Maximum is 65536 bytes.
Global variables use 80 bytes (0%) of dynamic memory, leaving 8112 bytes for local variables. Maximum is 8192 bytes.
error: Failed to open COM9
Failed uploading: uploading error: exit status 0xffffffff
Now, here's the strange thing. I've changed the FTDI chip twice, still getting the same issues. But I COULD read the serial port's ADC from the pin A0. (works well too!).
And sometimes, some strange thing happens when I plug in the chip. My mouse would stop working for a while, and some wonky things happen on my screen like right-clicks occurring around my desktop without me clicking.
So I'm thinking it's definitely hardware, but I couldn't determine which.
The COM Port is detected in the Device Manager, yes. But when I try to load a simple blinking code, it says "Failed to open COM9". Changing the COM Port number didn't help too.
Anyone?
Thanks!
Vizier87