Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uVision project cannot build #22

Open
RdaZhongyao opened this issue Aug 30, 2016 · 1 comment
Open

uVision project cannot build #22

RdaZhongyao opened this issue Aug 30, 2016 · 1 comment

Comments

@RdaZhongyao
Copy link

My env:

Python 2.7.12
progen 0.9.2
Keil MDK 5.17
ARM Compiler 5.06 update 1 (build 61)

As the README.md says, execute cmd:

$ progen generate -t uvision

then open project projectfiles\uvision\lpc4088\lpc4088.uvproj, try to build the target, log shows:

Build target 'lpc4088'

then MDK UV4.EXE collapses.

anything wrong?

@RdaZhongyao
Copy link
Author

Improper template file causes the error!

That is the file: https://github.com/mbedmicro/FlashAlgo/blob/master/records/tools/uvision.uvproj.tmpl

  • wrong section
          <AfterMake>
            <RunUserProg1>1</RunUserProg1>
            <RunUserProg2>1</RunUserProg2>
            <UserProg1Name>..\..\..\scripts\post_build.bat "#KARM\ARMCC\bin\fromelf --bin [email protected] -o $L@L" "#KARM\ARMCC\bin\fromelf --text -s [email protected] -o $L@L\symbols" "#KARM\ARMCC\bin\armar --create $L@L\@L.ar $L*.o"</UserProg1Name>
            <UserProg2Name>python ..\..\..\scripts\generate_blobs.py $L@L</UserProg2Name>
            <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
            <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
          </AfterMake>

Fix it!

Just move these commands into bat file: https://github.com/mbedmicro/FlashAlgo/blob/master/scripts/post_build.bat

  • uvision.uvproj.tmpl
          <AfterMake>
            <RunUserProg1>1</RunUserProg1>
            <RunUserProg2>0</RunUserProg2>
            <UserProg1Name>..\..\..\scripts\post_build.bat $KARM $L @L</UserProg1Name>
            <UserProg2Name></UserProg2Name>
            <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
            <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
          </AfterMake>
  • post_build.bat
set KEIL_ARM=%1
REM make sure fromelf is part of path
set path=%KEIL_ARM%\ARMCC\bin;%path%
set base_path=%2
set trgt_name=%3
set base_name=%base_path%%trgt_name%
fromelf --bin %base_name%.axf -o %base_name%
fromelf --text -s %base_name%.axf -o %base_name%\symbols
armar --create %base_name%\%trgt_name%.ar %base_path%*.o
set SCRIPTS=..\..\..\scripts
python %SCRIPTS%\generate_blobs.py %base_name%

then the projects build correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant