SparkFun Forums 

Where electronics enthusiasts find answers.

#219874
I'm trying to get up and running using the Artemis module on a custom board. I think I want to use mbed OS to get more control over the code and not have to worry about licenses as much but I am totally new to mbed.

Anyway, I can't get blinky to compile with the SFE_ARTEMIS_MODULE or the SFE_ARTEMIS targets in mbed. Here is the output when compiling using SFE_ARTEMIS_MODULE:
Code: Select all
[Error] mbed_pinmap_default.cpp@72,9: use of undeclared identifier 'USBTX'
[Error] mbed_pinmap_default.cpp@72,16: use of undeclared identifier 'USBRX'
[Error] mbed_pinmap_default.cpp@75,15: invalid application of 'sizeof' to an incomplete type 'const PinName []'
[Error] mbed_pinmap_default.cpp@96,53: use of undeclared identifier 'STDIO_UART_TX'
[Error] mbed_pinmap_default.cpp@103,16: invalid application of 'sizeof' to an incomplete type 'const int []'
[ERROR] .\mbed-os\hal\source\mbed_pinmap_default.cpp:72:9: error: use of undeclared identifier 'USBTX'
USBTX, USBRX
^
.\mbed-os\hal\source\mbed_pinmap_default.cpp:72:16: error: use of undeclared identifier 'USBRX'
USBTX, USBRX
^
.\mbed-os\hal\source\mbed_pinmap_default.cpp:75:15: error: invalid application of 'sizeof' to an incomplete type 'const PinName []'
sizeof(pins) / sizeof(pins[0]),
^~~~~~
.\mbed-os\hal\source\mbed_pinmap_default.cpp:96:53: error: use of undeclared identifier 'STDIO_UART_TX'
static const int stdio_uart = pinmap_peripheral(STDIO_UART_TX, serial_tx_pinmap());
^
.\mbed-os\hal\source\mbed_pinmap_default.cpp:103:16: error: invalid application of 'sizeof' to an incomplete type 'const int []'
sizeof peripherals / sizeof peripherals[0],
^~~~~~~~~~~
5 errors generated.
Here is my code: (my custom board has LED connected to module pin D26)
Code: Select all
/* mbed Microcontroller Library
 * Copyright (c) 2019 ARM Limited
 * SPDX-License-Identifier: Apache-2.0
 */

#include "mbed.h"


// Blinking rate in milliseconds
#define BLINKING_RATE     500ms

#define MYLED D26

int main()
{
    // Initialise the digital pin LED1 as an output
    DigitalOut led(MYLED);

    while (true) {
        led = !led;
        ThisThread::sleep_for(BLINKING_RATE);
    }
}
And here is the config I am trying to build:
mbed config blinky.PNG

It looks like it won't compile because the module has no USB connection. I'm not sure where to go from here.

Any help would be greatly appreciated. Thanks! :)
You do not have the required permissions to view the files attached to this post.
#220146
Thanks for posting the fix. This will help our community because this is a very easy to miss detail just like the hide and seek champion, the almighty semicolon!
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]