Skip to content

tinymlgen #3

@Workshopshed

Description

@Workshopshed

I used TinyMLGen to create a header file to incorporate into EloquentTinyML and it created my model as

const unsigned char model_data[] DATA_ALIGN_ATTRIBUTE = ....

When I compile I get the following error:

TextClassifierExample:13:95: error: invalid conversion from 'const unsigned char*' to 'unsigned char*' [-fpermissive]

Of course, I can simply remove the "const" but on the Arduino ARM boards the const keyword is also used to put the code into flash rather than ram, similar to the PROGMEM keyword on the AVR boards.

The solution seems to be to cast the variable but I was wondering if theree was a better way.

Eloquent::TinyML::TfLite<NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, TENSOR_ARENA_SIZE> ml((unsigned char*)model_data);

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions