Arduino - sd card - usind SD.h - custom block - error


#1

_Good morning every one. _
A few days now, i am trying to make my own blocks, using the mblock extension builder.
I need to make sd card blocks using the sd.h library whitch is build in as far as i know .
when i am trying to upload the code to arduino, pops up the error below. Any ideas please.

Command failed: avr-toolchain/bin/avr-gcc -w -Os -Wl,–gc-sections -mmcu=atmega328p -o “/root/mblock-avr/temp/build/out.elf” “/root/mblock-avr/temp/build/code.o” “/app/src/external/arduino/mbot/libmbot.a” -lm /root/mblock-avr/temp/build/code.o: In function setup': /root/mblock-avr/temp/build/code.cpp:34: undefined reference toSD’ /root/mblock-avr/temp/build/code.cpp:34: undefined reference to SD' /root/mblock-avr/temp/build/code.cpp:34: undefined reference toSDClass::begin(unsigned char)’ /root/mblock-avr/temp/build/code.o: In function _GLOBAL__sub_I_myFile': /root/mblock-avr/temp/build/code.cpp:20: undefined reference toFile::File()’ collect2: error: ld returned 1 exit status
Arduino compile finish.
Arduino server disconnected.


#2

Hi manos,

1.Do you have any other library being referenced in the library you uploaded?

2.Did you put your library in a folder when uploading the file?

Please let me know, if it still doesn’t work, you could send me the file and we’ll take a look into it then.

Best,

Allen


#3

Dear Allen thank you very much for the reply.
I am going to explain the steps i followed just to be more specific so it will be easier to find a solution.

As i wrote to the previous message i started making blocks using the extension builder (Very nice tool). I am a first grade computer science teacher and i want to create blocks so it can be easier for my class to create more advance projects the easy way.

Here are the steps.

  1. I opened the File→examples→SD→ readwrite example in the Arduino IDE.
  2. I copied the programming lines that i needed to use and paste them in the blocks i created.
  3. when I join all the blocks together in the extension builder, the produced code in the arduino code window of the builder is the same as the example I copied.
  4. I use the build in arduino library SD and as far as I understand there is no need to attach any of the .cpp and .h files in the builder.


#4

Hi manos,

I seem to understanding the issue you’re running into. Currently our engineer is off and will be back to work in two days. I will transfer your concern to him and get back to you soon. Please be patient and wait for our responses.

Besides, since I saw you don’t have any .cpp or .h file uploaded. Even though you mentioned you thought there is no need to upload extra files, how about just try and see if it works?

Also, if you don’t mind, we’d suggest you share your extension file with us so we could debug for you easier and faster. We will delete it after debugging as we think it’s your property and will protect your extension. But it all depends on you and we will respect your decision.

Best,

Allen


#5

Dear Allen,

Before creating the topic in the forum i have tried your suggestion about uploading the .cpp or .h files with no luck.

I am sending you the extension file. Don’t worry about the rights. The rights will be Creative commons.
The extension is on the link below.
https://drive.google.com/file/d/1HoKDXqCSfevuXf88xziEaB99bsy-rTvP/view?usp=sharing

The complete extension when is done, will be on the link below.

Thank you for your response
Looking forward to hearing from you soon

Kind regards
Manos


#6

Dear manos,

After our engineer looking into your extension. We found the cause of this bug is due to the miss of the file in our Arduino server. We will fix this issue as soon as possible in our next ext builder release. I will let you know when we fix it.

Best,

Allen


#7

Just to confirm, it will probably be fixed in a few days.


#8

Dear allen
thank you very much for the info.
The question that arises is that, if i want to create a block that uses a library whitch is not build in, in your arduino server, what should i do to make it work?
I resently added a BME280 block. I added the .h file in the upload section of extension builder but it does not work.

Thank you in advance.


#9

Hi manos,

Good question! We’re considering making dynamic compiling which does not rely on what resources and libraries we have on the Arduino server. But it might take some time. Please stay tuned. We have already supported mostly used libraries, but if you still have libraries not supported yet, you could still achieve the extension by providing the libraries to us.

Extension builder is indeed not perfect at this moment, but we’re progressing with your feedbacks and suggestions. Thanks for your support!

Best,

Allen


#10

Hi manos,

We are still fixing the issue at the time. Just to let you know, it might be fixed by next week. You could try some other development work so when our work is done, you can quickly test it. Apologize for the delay.

Best,

Allen


#11

Dear Allen,
Thank you very much for the information. I am very happy that I helped debugging.
The extension building tool is great. You have done a great job! It will be the best tool for teaching robotics, if the programming team manage to create the dynamic compilation. It will be my favorite tool and I am going to suggest it to my colleagues too.

Kind regards
Manos


#12

Hi Manos,

Finally, we’ve fixed the issue (it was actually tougher than we thought it would be). Now your file should be able to be complied and the ‘missing’ error should not happen if the fix works.

Thanks again for your patience and choice of Extension Builder. Hope you could develop your extension successfully.

Best,

Allen


#13

By the way,

About the dynamic compiling. In fact, we already have full fundamental Arduino library supported in the server. In your case, since it was a “missing of file” bug, otherwise, you wouldn’t be able to run into this issue, that’s being said, in most cases, you don’t have to worry about this.

Best,

Allen


#14

uzun bir ara ama sorun çözüldü mü?
başardınız mı?
yardım etmek isterim.