Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 2 months ago.
Importing a package from your local computer
Hello
How can you import a whole package of code from your local computer?
A general answer should suffice; however in my particular situation, I want to import code for Hexiwear's Original Factory code, which i could not find on mbed.org. I do have the MikroC for Arm code, which lots of levels of directories and files. Therefore I would prefer to import the code rather than manual create files to copy-and-paste code.
Thank you,
1 Answer
7 years, 2 months ago.
- Go to your profile page.
- Go to the code tab.
- Click *Create repository*.
- After creation, look under 'Clone repository to desktop' and note that URL.
- Create a new Mercurial (hg) repository, commit your code and push to this URL.
Now you can import the project in the online compiler.
Hi. Thank you for this. However I do not know what is a Mercurial (hg) repository). Can you explain please?
posted by 30 Aug 2017It's a source control management system. It's what we use to store code on mbed.org. Install Mercurial, then open a terminal in the project you want to upload (locally) and type:
$ hg init $ hg add . $ hg commit -m "initial commit"
Then create a file .hg/hgrc
and add:
[paths] default = http://PATH_TO_YOUR_REPO_ON_MBED
Then from the terminal, run:
$ hg push
Hi there,
Are you using the Online Compiler or offline Mbed CLI?
- Jenny, team Mbed
posted by Jenny Plunkett 29 Aug 2017Hi Jenny. I am using the Online Compiler on SeaMonkey 2.46 and Firefox49.0, on MS Windows 7.
posted by Therverson Kanavathy 29 Aug 2017Another option is to use the online IDE:
- On the toolbar click on the Import button.
- Proceed to the Upload tab.
- Click on the Browse button located at bottom-left corner.
- Navigate to the folder on your PC which contains the files you'd like to upload.
- Select files one by one to be added to the upload list ( (NOTE: if you pack them in advance then it's sufficient to upload the zip file).
- Once the list is complete, click on the Import! button located in the upper-right corner and then specify the destination program name.
posted by Zoltan Hudak 30 Aug 2017Ah, that's actually better! Didn't know that we had that feature :-)
posted by Jan Jongboom 31 Aug 2017