Giter Site home page Giter Site logo

Compile fails for non-ulp project about ulptool HOT 8 OPEN

duff2013 avatar duff2013 commented on September 28, 2024
Compile fails for non-ulp project

from ulptool.

Comments (8)

duff2013 avatar duff2013 commented on September 28, 2024 1

I have a fix, basically I just create a blank temporary .s file and compile it to get those files after I delete that temporary file. This is not a complete fix because it might use 12 bytes Slow RTC memory but I hope it will work for now until I can figure out a better way.

@2010019970909 The only way I can see the script being able to handle this is if there are no ulp files detected then delete the flags in my platform.local.txt file or add them to it if there are. But for now the fix I have works and need to publish some more pressing fixes for other big issues with how the ulp is allocated RTC Memory in the esp core at compile time.

from ulptool.

duff2013 avatar duff2013 commented on September 28, 2024

oh man thanks for letting know!

from ulptool.

Vincent-Stragier avatar Vincent-Stragier commented on September 28, 2024

Yes, same error (I've used 'blink' to test it). But I don't think that comes from the 'esp32ulp_build_recipe.py' script since it just open, close 'ulp_main.ld' and exit the script in this case. My only clue is the 'platform.local.txt' file but I don't know the syntax...

from ulptool.

duff2013 avatar duff2013 commented on September 28, 2024

For the time being to get it to compile just add blank .s file to your sketch.

from ulptool.

Vincent-Stragier avatar Vincent-Stragier commented on September 28, 2024

Examples are in a read only directory. I'll try to find an other workaround since just automatically creating an empty 'ulp.s' file is not really an option for the examples.

from ulptool.

Vincent-Stragier avatar Vincent-Stragier commented on September 28, 2024

After 'some' investigations, I found that the issue comes from the extra flag

compiler.c.elf.extra_flags="-L{build.path}/sketch/" -T ulp_main.ld "{build.path}/sketch/ulp_main.bin.bin.o"

in "platform.local.txt".

So it will be useful to add a conditional statement somehow... IDK for the moment.

Edit: I omit to say that commenting this line (Add ## in front of the line) is a tested working workaround for the examples.

from ulptool.

Vincent-Stragier avatar Vincent-Stragier commented on September 28, 2024

I don't think it's possible to have a conditional statement in the 'platform.local.txt'. So, maybe overwriting the recipe:

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf" 

in the 'platform.local.txt', use a python script to add flag or no. @duff2013 do you think it can be a fix for this issue ?

Edit: Maybe the main python script can also handle this task.

from ulptool.

Vincent-Stragier avatar Vincent-Stragier commented on September 28, 2024

On my fork, I've added an modified 'platform.local.txt' file to launch a script ('recipe_c_combine_pattern.py') which build the correct command for the gcc compiler. As usually, I've tested it only on windows.

from ulptool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.