Jump to content

Compile firmware for the OpenScope MZ failed,why?


Recommended Posts

Hello,I downloaded openscope-mz-master.zip firmware from github ,then follow content of  README.md ,but compiled failed.:

Arduino:1.6.9 (Windows 10),  development board:"Digilent OpenScope"

C:\Users\victory\AppData\Local\Temp\build4e1e4857f8074ecba6789be3a91b1a66.tmp/core\core.a(main.cpp.o): In function `main':

c:/users/victory/appdata/local/arduino15/packages/digilent/hardware/pic32/1.0.3/cores/pic32/main.cpp:58: undefined reference to `setup'

c:/users/victory/appdata/local/arduino15/packages/digilent/hardware/pic32/1.0.3/cores/pic32/main.cpp:63: undefined reference to `loop'

collect2.exe: error: ld returned 255 exit status

exit status 255

why?how to solve it?

then I try to unzipped openscope-mz-master.zip and copied it directly to   “c:/users/victory/appdata/local/arduino15/packages/digilent/hardware/pic32/1.0.3/cores/pic32/”.

 

image.png.e7d1c5eb5dc7320ea84ab8d485c52b70.png

image.png.7f2c4a1cbd0989b44c0f7c34f67f7957.png

image.thumb.png.4fb2cd0eb0b81555fa2a060f4b9076cb.png

 then success compiled, why need to copy to that directory?

And I  find  that there are no codes in OpenScope.ino file,how does it work?image.thumb.png.4fb2cd0eb0b81555fa2a060f4b9076cb.png

In addition, I found that because I unzipped openscope-mz-master.zip and copied it directly to   “c:/users/victory/appdata/local/arduino15/packages/digilent/hardware/pic32/1.0.3/cores/pic32/”., this action seems to lead to mistakes, a detailed look 

why,how to solve these problem?

@everyone, @Kristoff

Thanks a lot.

 

Link to comment
Share on other sites

  • 2 weeks later...

Hey Victory,

The OpenScope MZ firmware is designed to open in the Arduino IDE and MPLABX.  The Arduino IDE has some unique requirements that require a few little tricks to get it to work, which is why you don't see code in the main .ino file.

When you opened the .ino file it probably said that the .ino needs to be in a folder with the same name as the .ino and gave you the option to fix it for you.  If you do that it will create a sub folder and put the .ino in that folder which causes these problems.

  • Please delete any copies of the firmware source you extracted.
  • Extract a new copy of the firmware anywhere on your PC (it does not need to be inside the Arduino path).
  • Rename the folder from openscope-mz-master to OpenScope.
  • Copy the supporting libraries from the OpenScope/libraries directory into your Arduino libraries directory.
  • Open OpenScope.ino in the newly renamed folder.
  • You should now see several source files open in the Arduino IDE as shown below and the build should be able to compile the firmware.

image.png

I'll add these details to the readme.

Let us know if you have any more questions about this.

Thanks!

-Kristoff

 

Link to comment
Share on other sites

On 2018/1/5 at 1:50 AM, Kristoff said:

Hey Victory,

The OpenScope MZ firmware is designed to open in the Arduino IDE and MPLABX.  The Arduino IDE has some unique requirements that require a few little tricks to get it to work, which is why you don't see code in the main .ino file.

When you opened the .ino file it probably said that the .ino needs to be in a folder with the same name as the .ino and gave you the option to fix it for you.  If you do that it will create a sub folder and put the .ino in that folder which causes these problems.

  • Please delete any copies of the firmware source you extracted.
  • Extract a new copy of the firmware anywhere on your PC (it does not need to be inside the Arduino path).
  • Rename the folder from openscope-mz-master to OpenScope.
  • Copy the supporting libraries from the OpenScope/libraries directory into your Arduino libraries directory.
  • Open OpenScope.ino in the newly renamed folder.
  • You should now see several source files open in the Arduino IDE as shown below and the build should be able to compile the firmware.

image.png

I'll add these details to the readme.

Let us know if you have any more questions about this.

Thanks!

-Kristoff

 

Thank you very much.Are you using the Arduino IDE when developing? I found the editing tips for this Arduino IDE so weak and not smart enough. If you are using MPLAB-X development, can you give me a simple steps to import this project, as the above answer. thank you very much.

Link to comment
Share on other sites

We don't use the Arduino IDE for development.  We use MPLABX.

The MPLABX project setup varies depending on what you want to do, but you should be able to create a new project, target the correct PICMZ, import the source code and build it.  You'll also need to setup a programmer / debugger and any other supporting resources you decide to use.  Since this setup is pretty open ended we decided to leave it up to users to choose how to setup their environment based on their specific requirements.

-Kristoff

Link to comment
Share on other sites

On 2018/1/9 at 3:49 AM, Kristoff said:

We don't use the Arduino IDE for development.  We use MPLABX.

The MPLABX project setup varies depending on what you want to do, but you should be able to create a new project, target the correct PICMZ, import the source code and build it.  You'll also need to setup a programmer / debugger and any other supporting resources you decide to use.  Since this setup is pretty open ended we decided to leave it up to users to choose how to setup their environment based on their specific requirements.

-Kristoff

Thanks a lot, I will try to use MPLABX to build this project by the way to learn it.Can you give me a project for MPLABX .zip that you used to develop OpenScope MZ as a reference?Thanks a lot.

@Kristoff    

@JColvin 

Link to comment
Share on other sites

Victory, I would be interested in your results building the MPLABX project.  I have attempted to build the project from the recent GitHub 1.296.0 files with partial success.  It seems like there may be a missing file or project definition, in particular for the value "F_CPU" which is used a number of places, but not defined in the source, so far as I can tell.  Additionally, the 2 files in which the macro is used do not include any common header files, which leads me to believe that F_CPU is defined in the project somehow.  I did add the #define in each of the 2 files to set this value at 200000000L, which I derived from the comments.

Link to comment
Share on other sites

  • 3 weeks later...
On 2018/1/10 at 5:00 AM, Ryan Minnig said:

Victory, I would be interested in your results building the MPLABX project.  I have attempted to build the project from the recent GitHub 1.296.0 files with partial success.  It seems like there may be a missing file or project definition, in particular for the value "F_CPU" which is used a number of places, but not defined in the source, so far as I can tell.  Additionally, the 2 files in which the macro is used do not include any common header files, which leads me to believe that F_CPU is defined in the project somehow.  I did add the #define in each of the 2 files to set this value at 200000000L, which I derived from the comments.

Oh,Thats cool,can you give the MPLABX project (zip) for me? I am interested in it. You can give me a link or send me a mail(victory_it@163.com).Thanks a lot!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...