Show Posts
Pages: [1] 2
1  Using Arduino / Installation & Troubleshooting / Cannot program 1284p on linux, works on mac on: June 02, 2014, 01:00:59 pm
This issue is driving me nuts. I am working on a project with some other guys who built the electronics. We have custom boards with an atmega 1284p. For USB cummunication with the 1284p we use a FTDI FT230X USB Bridge (http://www.ftdichip.com/Products/ICs/FT230X.html). This doesn't hav DTR. RTS is used to reset the board using a capacitor (pretty much like with off the shelf arduinos).
The arduino bootloader is used, and we use https://github.com/maniacbug/mighty-1284p to upload. The board selected is "Original Mighty 1284p 8MHz". After installing the right ftdi drivers from http://www.ftdichip.com/Drivers/VCP.htm I can upload to the board from a mac. Linux has these drivers built into the kernel. However, I cannot upload to the board. AVR gives the following error:

Code:
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30]   [20]

dmesg gives the following:

Code:
...
[   51.299964] usbcore: registered new interface driver ftdi_sio
[   51.300088] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
...

and lspci:

Code:
...
Bus 001 Device 006: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
...

The settings for the mac and linux machine are identical. On both I use arduino 1.0.5. Both do see the correct serial port.

I've seen many posts in this forum with similar problems, but have yet to find one with a solution that works for me. Holding reset, or clicking it just before uploading does not work. As suggested in some forums I have tried with removing brltty to no avail. I have tried uploading with the arduino IDE, eclipse with avr plugin and avr via commandline. None will work. I've tried it on different maachines as well with different versions of ubuntu, and uploading works in none of them. Adding -c arduino to avrdude command doesn't do the trick either. Any ideas on how to fix this?

P.S. Programming other arduino types, like a duemilanove work fine under linux

Question duplicated here: https://stackoverflow.com/questions/24009955/cannot-program-atmega1284p-with-arduino-on-linux-works-on-mac
2  Development / Other Software Development / Re: Arduino Programmed from eclipse does nothing on: July 19, 2011, 07:52:32 am
I think I can. I'm doing some testing at this point, if that doesn't work out I will sent you the project.
3  Development / Other Software Development / Re: Arduino Programmed from eclipse does nothing on: July 19, 2011, 07:32:50 am
Hey Maruis,

Thanks for your reply. Sorry for my late reaction, I was away for a short holiday. Your settings work well with a c project. The thing is that I need (actually, want) object oriƫntation. The weird thing is that compiling gives no errors and even uploading goes well, but then, nothing...
4  Development / Other Software Development / Arduino Programmed from eclipse does nothing on: July 06, 2011, 09:16:35 am
Hey All,

Hope this is the right forum, but here goes. I've used the description on http://www.arduino.cc/playground/Code/Eclipse to get everything up and running in Eclipse. To be complete, I run Ubuntu 11.04 with Eclipse 3.6.2
Now here's the weird part. When I create a main.cpp file the way suggested, i get no compile errors whatsoever. Uploading to the arduino all goes well, but then comes the weirdness. Without changes to the code, different uploads give different results. Here's what is supposed to happen:
led 13 should blink on and off (every 750 ms) an every second "loop" should be written on Serial. Whta happens is that after upload sometimes pin 13 blinks, but then superfast and Serial does nothing. Most of the time however nothing happen and every pin exept the ground pin is set to HIGH (or atleast, whenever I connect a led it lights up). When I copy the setup and loop functions to an arduino sketch everything works.
Heres main.cpp:

Code:
#include <stdlib.h>
#include <WProgram.h>

unsigned long currentTime = 0;
unsigned long sendTime = 0;

void setup()
{
Serial.begin(4800);
pinMode(13, OUTPUT);
}

void loop()
{
currentTime = millis();
digitalWrite(13, (currentTime % 1500 <750) ? LOW : HIGH);
if(currentTime - sendTime > 1000)
{
sendTime = currentTime;
Serial.println("loop");
}
}

extern "C" void __cxa_pure_virtual()
{
  cli();
  for (;;);
}

__extension__ typedef int __guard __attribute__((mode (__DI__)));

void * operator new(size_t size)
{
  return malloc(size);
}

void operator delete(void * ptr)
{
  free(ptr);
}

void * operator new[](size_t size)
{
    return malloc(size);
}

void operator delete[](void * ptr)
{
if (ptr)
free(ptr);
}

int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}
void __cxa_guard_release (__guard *g) {*(char *)g = 1;}
void __cxa_guard_abort (__guard *) {}

int main(void)
{
init();
setup();
for(;;)
{
loop();
}
return 0;
}

5  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 16, 2009, 05:44:50 am
ok, good to know.
6  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 16, 2009, 05:13:03 am
This seems to work indeed. Why isn't arduino creating prototypes for references?
7  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 16, 2009, 05:00:55 am
@mem: I need the reference because I want to have a general function to set global variables.
8  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 16, 2009, 04:59:35 am
It seems to go wrong with the references. When I remove them (which I don't want), compiling works.
9  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 16, 2009, 04:53:08 am
Ok, I've broke it even more down and still getting the error. Here's the code as it is now:
Code:
int redInterval   = 0;
long redStartTime   = 0;

void setup()
{
  Serial.begin(9600);
  setColorInterval(redStartTime, redInterval);
}

void loop()
{
}

void setColorInterval(long &startTime, int &interval)
{
}
10  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 16, 2009, 04:16:18 am
I thought of that as well, but when i remove the second function (it can be done without of course) the problem remaines.
11  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 15, 2009, 12:16:22 pm
cpp file:
Code:
// CONSTANTS
#include "WProgram.h"
void setup();
void loop();

const char STATE_DEFAULT  = 'A';

// ENVIRONMENT VARIABLES
long currentTime = 0;
char state = STATE_DEFAULT;
int redInterval   = 0;
int blueInterval  = 0;
int greenInterval = 0;
long redStartTime   = 0;
long blueStartTime  = 0;
long greenStartTime = 0;

void setup()
{
  Serial.begin(9600);
  setColorInterval(redStartTime, redInterval);
  setColorInterval(blueStartTime, blueInterval);
  ssetColorInterval(greenStartTime, greenInterval);
}

void loop()
{
}

void setColorInterval(long &startTime, int &interval, int minInterval, int maxInterval)
{
  if((startTime == 0) || (currentTime - startTime >= interval))
  {
    interval = random(minInterval, maxInterval);
    startTime = currentTime;
  }
}

void setColorInterval(long &startTime, int &interval)
{
  setColorInterval(startTime, interval, 0, 10000);
}

int main(void)
{
      init();

      setup();
    
      for (;;)
            loop();
        
      return 0;
}



It seems that something goes wrong since no prototype is created for the functions
12  Forum 2005-2010 (read only) / Syntax & Programs / Re: function not declared in scope on: December 15, 2009, 12:02:36 pm
This works indead, but it should work without. I have written programs in arduino before in the same way and it worked perfect. This is because the arduino build environment automatically creates prototypes for functions in the main tab of a sketch so there is no need to put a function declaration before it is called. So my question remaines.
13  Forum 2005-2010 (read only) / Syntax & Programs / function not declared in scope on: December 15, 2009, 11:42:05 am
This is the program (not finished as you can see):
Code:
// CONSTANTS
const char STATE_DEFAULT  = 'A';

// ENVIRONMENT VARIABLES
long currentTime = 0;
char state = STATE_DEFAULT;
int redInterval   = 0;
int blueInterval  = 0;
int greenInterval = 0;
long redStartTime   = 0;
long blueStartTime  = 0;
long greenStartTime = 0;

void setup()
{
  Serial.begin(9600);
  setColorInterval(redStartTime, redInterval);
  setColorInterval(blueStartTime, blueInterval);
  ssetColorInterval(greenStartTime, greenInterval);
}

void loop()
{
}

void setColorInterval(long &startTime, int &interval, int minInterval, int maxInterval)
{
  if((startTime == 0) || (currentTime - startTime >= interval))
  {
    interval = random(minInterval, maxInterval);
    startTime = currentTime;
  }
}

void setColorInterval(long &startTime, int &interval)
{
  setColorInterval(startTime, interval, 0, 10000);
}

When I compile this code I get a "In function 'void setup()': error: 'setColorInterval' was not declared in this scope".
Even when I move the function call from setup to loop() it still gives me the error for loop. Why am I getting this error?
14  Forum 2005-2010 (read only) / Troubleshooting / Re: arduino library with eclipse on: December 01, 2009, 06:30:11 am
I am struggling with this as well. I have HardwareSerial.h included but is doesn't make any difference. Does anybody have this fixed yet?
15  Forum 2005-2010 (read only) / Interfacing / Re: Interfacing Dynamixel AX-12 servo? on: November 03, 2009, 05:35:41 am
This topic is old, but I'm trying to get this thing working as well, not with succes for now... Anybody got this working?
Pages: [1] 2