Hello,,
I have trouble compiling a atm88, I get the message:
D:\PAPA\flowcode\voorbeelden\test1>"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\bin\avr-gcc.exe" -mmcu=atmega88 -Os -funsigned-char -o "D:\PAPA\flowcode\VOORBE~1\test1\druk188.elf" "D:\PAPA\flowcode\VOORBE~1\test1\druk188.c"
In file included from D:\PAPA\flowcode\VOORBE~1\test1\druk188.c:57:
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'FC_MARKER':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:110: error: 'DDRA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:110: error: (Each undeclared identifier is reported only once
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:110: error: for each function it appears in.)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:112: error: 'PORTA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:114: error: 'PINA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'icd_byte_tx':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:329: error: 'DDRA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:331: error: 'PORTA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'icd_byte_rx':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:366: error: 'DDRA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:374: error: 'PINA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:385: error: 'PORTA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'wait_clock':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:401: error: 'PINA' undeclared (first use in this function)
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'wait_data':
C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h:413: error: 'PINA' undeclared (first use in this function)
Error returned from [avr-gcc.exe]
....................
Return code = 1
Please help
problem atm88
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: problem atm88
Hello
If you look at the chip window for the ATMEGA88 then you will see that the device does not have a port A. This is why the various references to Port A are failing. Check your program and your component connections to make sure you are not using port A in your program and the code should then compile correctly.
If you look at the chip window for the ATMEGA88 then you will see that the device does not have a port A. This is why the various references to Port A are failing. Check your program and your component connections to make sure you are not using port A in your program and the code should then compile correctly.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: problem atm88
I don't have anything connected on porta see c-file
//************************************************************************************
//**
//** File name: D:\PAPA\flowcode\voorbeelden\test1\druk188bis.c
//** Generated by: Flowcode v3.3.5.45
//** Date: Monday, December 21, 2009 17:41:18
//** Licence: Professional
//** Registered to: Vandecruys Johan
//**
//**
//** http://www.matrixmultimedia.com
//************************************************************************************
#define MX_AVR
//Defines voor de microcontroller
#define MX_AVR
#define MX_EE
#define MX_EE_SIZE 512
#define MX_SPI
#define MX_SPI_B
#define MX_SPI_SDI 4
#define MX_SPI_SDO 3
#define MX_SPI_SCK 5
#define MX_UART
#define MX_UART_ID
#define MX_UART_UCSRC
#define MX_UART_C
#define MX_UART_TX 1
#define MX_UART_RX 0
#define MX_MI2C
#define MX_I2C_C
#define MX_I2C_SDA 4
#define MX_I2C_SCL 5
#define MX_PWM
#define MX_PWM_PORT PORTB
#define MX_PWM_CNT 2
#define MX_PWM_TRIS1 DDRB
#define MX_PWM_1 1
#define MX_PWM_TRIS2 DDRB
#define MX_PWM_2 2
//Functies
#define F_CPU 20000000UL
#include <avr\io.h>
#include <avr\interrupt.h>
#include <avr\eeprom.h>
#include <MX_util\delay.h>
#include <MX_util\bit_cmds.h>
//Configuratiegegevens
#pragma DATA 0x0, 0xdf
#pragma DATA 0x1, 0xff
#pragma DATA 0x2, 0xff
//Interne functies
#include "C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h"
//Macro functie declaraties
//Variable declaraties
volatile char FCV_OUTPUT;
volatile char FCV_DRUKC1;
volatile char FCV_DRUKCO;
//Toegevoegde definities
//Macro implementaties
//Toegevoegde implementaties
int main()
{
//Initialisatie
MCUSR=0x00;
WDTCSR=0x10;
//Interrupt initialisatie code
//Loop
//Loop: While 1
while( 1 )
{
//Input
//Input: C0 -> drukco
DDRC = DDRC & 0xfe;
FCV_DRUKCO = ((PINC & 0x01) == 0x01);
//Input
//Input: C1 -> drukc1
DDRC = DDRC & 0xfd;
FCV_DRUKC1 = ((PINC & 0x02) == 0x02);
//Decision
//Decision: drukco?
if( FCV_DRUKCO )
{
//Calculation
//Calculation:
// output = output + 1
FCV_OUTPUT = FCV_OUTPUT + 1 ;
}
//Output
//Output: output -> PORT B
DDRB = 0xFF;
PORTB = FCV_OUTPUT;
}
mainendloop: goto mainendloop;
}
//************************************************************************************
//**
//** File name: D:\PAPA\flowcode\voorbeelden\test1\druk188bis.c
//** Generated by: Flowcode v3.3.5.45
//** Date: Monday, December 21, 2009 17:41:18
//** Licence: Professional
//** Registered to: Vandecruys Johan
//**
//**
//** http://www.matrixmultimedia.com
//************************************************************************************
#define MX_AVR
//Defines voor de microcontroller
#define MX_AVR
#define MX_EE
#define MX_EE_SIZE 512
#define MX_SPI
#define MX_SPI_B
#define MX_SPI_SDI 4
#define MX_SPI_SDO 3
#define MX_SPI_SCK 5
#define MX_UART
#define MX_UART_ID
#define MX_UART_UCSRC
#define MX_UART_C
#define MX_UART_TX 1
#define MX_UART_RX 0
#define MX_MI2C
#define MX_I2C_C
#define MX_I2C_SDA 4
#define MX_I2C_SCL 5
#define MX_PWM
#define MX_PWM_PORT PORTB
#define MX_PWM_CNT 2
#define MX_PWM_TRIS1 DDRB
#define MX_PWM_1 1
#define MX_PWM_TRIS2 DDRB
#define MX_PWM_2 2
//Functies
#define F_CPU 20000000UL
#include <avr\io.h>
#include <avr\interrupt.h>
#include <avr\eeprom.h>
#include <MX_util\delay.h>
#include <MX_util\bit_cmds.h>
//Configuratiegegevens
#pragma DATA 0x0, 0xdf
#pragma DATA 0x1, 0xff
#pragma DATA 0x2, 0xff
//Interne functies
#include "C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h"
//Macro functie declaraties
//Variable declaraties
volatile char FCV_OUTPUT;
volatile char FCV_DRUKC1;
volatile char FCV_DRUKCO;
//Toegevoegde definities
//Macro implementaties
//Toegevoegde implementaties
int main()
{
//Initialisatie
MCUSR=0x00;
WDTCSR=0x10;
//Interrupt initialisatie code
//Loop
//Loop: While 1
while( 1 )
{
//Input
//Input: C0 -> drukco
DDRC = DDRC & 0xfe;
FCV_DRUKCO = ((PINC & 0x01) == 0x01);
//Input
//Input: C1 -> drukc1
DDRC = DDRC & 0xfd;
FCV_DRUKC1 = ((PINC & 0x02) == 0x02);
//Decision
//Decision: drukco?
if( FCV_DRUKCO )
{
//Calculation
//Calculation:
// output = output + 1
FCV_OUTPUT = FCV_OUTPUT + 1 ;
}
//Output
//Output: output -> PORT B
DDRB = 0xFF;
PORTB = FCV_OUTPUT;
}
mainendloop: goto mainendloop;
}
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: problem atm88
Hello
Where did you get your installation for Flowcode AVR from?
Your compiled C code states v3.3 but your error messages are showing an error relating to a function that is only included in version 4.
Can you uninstall your version 3 and re-install to see if that fixes the problem.
Where did you get your installation for Flowcode AVR from?
Your compiled C code states v3.3 but your error messages are showing an error relating to a function that is only included in version 4.
Have you installed version 4? Have you mixed up the files at all.C:\Program Files\Matrix Multimedia\Flowcode_AVR\FCD\internals.h: In function 'icd_byte_tx':
Can you uninstall your version 3 and re-install to see if that fixes the problem.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: problem atm88
First: THANK YOU!!!
Yes it worked.
I got my copy from Elektor.
I first installed the free copy from the website and than simply put in the licensekey from the DVD.
Greetings.
Yes it worked.
I got my copy from Elektor.
I first installed the free copy from the website and than simply put in the licensekey from the DVD.
Greetings.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: problem atm88
Hello Ikke
Great glad your all up and running now. Thanks for letting us know.
Great glad your all up and running now. Thanks for letting us know.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: problem atm88
Hello, I am still can't put my program into the atm88 directly from flowcode. When using avr studio it goes.? I keep receiving:
Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode_AVR\Tools\MX_bats\avrc.bat m88 avrispmkii usb "druk188bis.hex" 0 3 223 -1 -1
D:\PAPA\flowcode\voorbeelden\test1>"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\AVRDUDEusb\avrdude.exe" -p m88 -P usb -c avrispmkii -U flash:w:"druk188bis.hex"
Error returned from [avrdude]
Return code = 1
Verzenden van de flowchart naar de microcontroller is mislukt. Controleer de opties voor de programmeersoftware en de verbinding tussen PC en processor.
FINISHED
I allready looked at the posts on the forum but could not solve the problem on my one.
If anyone can help me?
Allready THANKS
Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode_AVR\Tools\MX_bats\avrc.bat m88 avrispmkii usb "druk188bis.hex" 0 3 223 -1 -1
D:\PAPA\flowcode\voorbeelden\test1>"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\AVRDUDEusb\avrdude.exe" -p m88 -P usb -c avrispmkii -U flash:w:"druk188bis.hex"
Error returned from [avrdude]
Return code = 1
Verzenden van de flowchart naar de microcontroller is mislukt. Controleer de opties voor de programmeersoftware en de verbinding tussen PC en processor.
FINISHED
I allready looked at the posts on the forum but could not solve the problem on my one.
If anyone can help me?
Allready THANKS