7 years, 8 months ago.

mbed IDE compatibility

Dear all,

I experience a few problems with the mbed and Atmel Studio, is there anyone who is using the Atmel Studio?

Thank you in advance!

Best regards,

Ilias

EDIT: First of all Atmel Studio creates a file in.cpp (which is not found), I replaced it with the main.cpp Then, when I tried to compile the code I received the following error: "Error 1 mbed_config.h: No such file or directory"

EDIT 2: I am just creating a simple blinky based project in the online compiler and then I export it for the Atmel Studio.

"few problems" More details please.

posted by Mark Peter Vargha 03 Apr 2017

3 Answers

7 years, 8 months ago.

The exports never seem to work right off and require a lot of tweaking of search paths and settings. I believe mbed_config.h is generated as part of the export. Here is one from a recent project as an example. Does this have everything you need? I don't know.

// Automatically generated configuration file.
// DO NOT EDIT, content will be overwritten.

#ifndef __MBED_CONFIG_DATA__
#define __MBED_CONFIG_DATA__

// Configuration parameters
#define MBED_CONF_CORE_STDIO_BAUD_RATE        9600//921600 // set by library:core
#define MBED_CONF_NSAPI_PRESENT               1    // set by library:nsapi
#define MBED_CONF_RTOS_PRESENT                1    // set by library:rtos
#define MBED_CONF_CORE_STDIO_CONVERT_NEWLINES 0    // set by library:core
// Macros
#define UNITY_INCLUDE_CONFIG_H                     // defined by library:utest

// RTOS Parameters
#define OS_TASKCNT         20

#endif

7 years, 8 months ago.

mbed_config.h missing from exported project is a known bug. https://github.com/ARMmbed/mbed-os/issues/4075

Here are some config files, you can create one for your project from these.

STM Discovery, no OS

// Automatically generated configuration file.
// DO NOT EDIT, content will be overwritten.

#ifndef __MBED_CONFIG_DATA__
#define __MBED_CONFIG_DATA__

// Configuration parameters
#define MBED_CONF_PLATFORM_STDIO_BAUD_RATE          9600 // set by library:platform
#define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600 // set by library:platform
#define MBED_CONF_PLATFORM_STDIO_FLUSH_AT_EXIT      1    // set by library:platform
#define MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES   0    // set by library:platform

#endif

STM32F103 Nucleo with OS

// Automatically generated configuration file.
// DO NOT EDIT, content will be overwritten.

#ifndef __MBED_CONFIG_DATA__
#define __MBED_CONFIG_DATA__

// Configuration parameters
#define MBED_CONF_NSAPI_PRESENT                     1    // set by library:nsapi
#define MBED_CONF_FILESYSTEM_PRESENT                1    // set by library:filesystem
#define MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES   0    // set by library:platform
#define MBED_CONF_EVENTS_PRESENT                    1    // set by library:events
#define MBED_CONF_RTOS_PRESENT                      1    // set by library:rtos
#define MBED_CONF_PLATFORM_STDIO_BAUD_RATE          9600 // set by library:platform
#define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600 // set by library:platform
#define MBED_CONF_PLATFORM_STDIO_FLUSH_AT_EXIT      1    // set by library:platform
// Macros
#define UNITY_INCLUDE_CONFIG_H                           // defined by library:utest

#endif

Hello, thank you very much for your reply. So just to get the point the config file is hardware dependent, for example I am using an Atmel R21 xplained-xpro board. Furthermore, you mention with/without OS, the exported project doesn't contain the OS(net stack,etc)? Thank you in advance!

posted by ILIAS SEITANIDIS 17 Apr 2017
7 years, 8 months ago.

Finally the export to Keil uV5 works...

I use the STM32F091, so the community license works upto 256Kbytes.