Closed OpusK closed 4 years ago
The field branch
here really needs to be a tag to get proper caching. I know the name is confusing.
In your codal folder, where you were doing your implementation, run ./build.py -l
- this will create a new tag in the target ( https://github.com/ROBOTIS-GIT/codal-cm300 ). Then put that tag in branch
field.
Let me know if that helps!
Also, make sure to use ./build -l
and not create tag with git tag
- the build.py
will also link to correct versions in all dependent repos.
It's best to test locally like you did before, without ./build.py -l
. The ./build.py -l
is needed to publish the fix at the end.
To test locally, I usually build from command line.
First, I suggest you add the following environment variables to your computer setup:
PXT_FORCE_LOCAL=1
PXT_RUNTIME_DEV=1
PXT_ASMDEBUG=1
The first one will force a non-cloud build, the second will force re-running cmake
on every build - this is useful if you make changes in codal, and the third adds additional debug information to generated binary.asm
(you may not need that, but it doesn't hurt).
Then, head to pxt-robotis/projects/my-project
. You can use an existing project created from localhost:3232
or create a new one. The pxt.json
should be modified to look something like this:
{
"name": "my-project",
"dependencies": {
"robotis-cm-300": "file:../../libs/robotis-cm-300"
},
"description": "",
"files": [
"main.ts"
]
}
The crucial part is "file:../../libs/..."
instead of "*"
- this will let you modify .cpp files in your target and pxt-common-packages and have these be picked up by build.
BTW, never edit files under built/dockercodal/pxtapp
- these will be overwritten.
If you edited pxtarget.json
, delete pxt-robotis/built/target*
that you may have left from previous pxt serve
or pxt buildtarget
.
Now, you should be ready to build, in pxt-robotis/projects/my-project
just run pxt
.
Then, run code build/dockercodal/libraries/*
, checkout appropriate branches in all repos (usually master), do your changes, run pxt
to test, and eventually do the steps with ./build.py -l
and editing pxtarget.json
to publish the fixes.
Let me know if this helps!
BTW, the critical bit is building your .uf2
file using pxt
command, not the web app.
@mmoskal.
hello, mmoskal. It was very helpful.
It seems that the problem occurred because the changes were not reflected as the cache was twisted.
Thank you.
I am closing this. Please reopen if the issue continues.
Hi, @pelikhan, @mmoskal.
Describe the bug Although the member function of a specific class not implemented in codal-core was implemented in a class that inherited the class, MakeCode does not link the proper runtime HEX file. Of course, these work without problems when using only the CODAL build system.
The CODAL code related to the previously modified Serial package or the newly added DYNAMIXEL worked well. Is there anything different about the core package?
To Reproduce Steps to reproduce the behavior:
pxt serve
orpxt serve --localbuild
Expected behavior I wrote it as a more specific example.
Screenshots
Before
After
Desktop:
Additional context