(toppers-users 4441) Windows10 Cygwin にてCFGがエラーが発生します。

Koizumi Yoshiyuki koizumiyoshiyuki @ gmail.com
2015年 10月 31日 (土) 11:21:35 JST


 こいさんです。

Windows10
64bitにCygwinをインストール。ASPの1.9.2にasp_stbee_armcc-20141201のターゲット部を追加してmakeを行ったところCFGでエラーが出ます。

----実行ログ
$ make depend
if ! [ -f Makefile.depend ]; then \
        rm -f kernel_cfg.timestamp kernel_cfg.h kernel_cfg.c ; \
        rm -f cfg1_out.c cfg1_out.o cfg1_out.exe cfg1_out.syms
cfg1_out.srec; \
        rm -f makeoffset.s offset.h; \
fi
rm -f Makefile.depend
../cfg/cfg/cfg --pass 1 --kernel asp -I. -I../include -I../arch -I..
 -I../target/stbee_gcc -I../arch/arm_m_gcc/stm32f
-I../arch/arm_m_gcc/common -I../arch/gcc --api-table
../kernel/kernel_api.csv --cfg1-def-table ../kernel/kernel_def.csv
 --cfg1-def-table ../arch/arm_m_gcc/common/core_def.csv sample1.cfg
../cfg/cfg/cfg: ../cfg/cfg/cfg: バイナリファイルを実行できません
Makefile:298: ターゲット 'cfg1_out.c' のレシピで失敗しました
make: *** [cfg1_out.c] エラー 126
----

上記のcfgコマンド切り出して、DOS窓で実行すると問題なくcfg1_out.cが作成できます。

----実行ログ
D:\devel\TOPPERS\ASP\asp_1_9_2\OBJ>..\cfg\cfg\cfg --pass 1 --kernel asp -I.
-I..\include -I..\arch -I..  -I..\target\stb
ee_gcc -I..\arch\arm_m_gcc\stm32f -I..\arch\arm_m_gcc\common -I..\arch\gcc
--api-table ..\kernel\kernel_api.csv --cfg1-d
ef-table ..\kernel\kernel_def.csv  --cfg1-def-table
..\arch\arm_m_gcc\common\core_def.csv sample1.cfg

D:\devel\TOPPERS\ASP\asp_1_9_2\OBJ>
----

CFGはバイナリをダウンロードして使っています。cfg-mingw-static-1_9_4.zip
DOS窓でcfg1_out.cを作成し、Makefileを2か所ほどしてだましてmake dependを実行するとそれなりに動作しています。

----実行ログ
/cygdrive/d/devel/TOPPERS/ASP/asp_1_9_2/OBJ
$ make depend
if ! [ -f Makefile.depend ]; then \
        rm -f kernel_cfg.timestamp kernel_cfg.h kernel_cfg.c ; \
        rm -f makeoffset.s offset.h; \
fi
rm -f Makefile.depend
arm-none-eabi-gcc -c  -mcpu=cortex-m3 -mthumb  -g  -Wall -O2   -I.
-I../include -I../arch -I..  -I../target/stbee_gcc
-I../arch/arm_m_gcc/stm32f -I../arch/arm_m_gcc/common -I../arch/gcc
-DALLFUNC  -fno-strict-aliasing -mcpu=cortex-m3 -I../kernel cfg1_out.c
arm-none-eabi-gcc -c  -mcpu=cortex-m3 -mthumb  -g  -Wall -O2   -I.
-I../include -I../arch -I..  -I../target/stbee_gcc
-I../arch/arm_m_gcc/stm32f -I../arch/arm_m_gcc/common -I../arch/gcc
-DALLFUNC  -fno-strict-aliasing -mcpu=cortex-m3 -I../kernel
../arch/arm_m_gcc/common/start.S
arm-none-eabi-gcc  -mcpu=cortex-m3 -mthumb  -g  -Wall -O2   -I.
-I../include -I../arch -I..  -I../target/stbee_gcc
-I../arch/arm_m_gcc/stm32f -I../arch/arm_m_gcc/common -I../arch/gcc   -T
../target/stbee_gcc/stbee.ld -o cfg1_out.exe \
                                         cfg1_out.o
d:/program files (x86)/gnu tools arm embedded/4.9
2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/crt0.o:
In function `_start':
(.text+0x0): multiple definition of `_start'
start.o:D:\devel\TOPPERS\ASP\asp_1_9_2\OBJ/../arch/arm_m_gcc/common/start.S:62:
first defined here
d:/program files (x86)/gnu tools arm embedded/4.9
2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/crt0.o:
In function `_start':
(.text+0x4a): undefined reference to `main'
d:/program files (x86)/gnu tools arm embedded/4.9
2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/crt0.o:
In function `_start':
(.text+0x64): undefined reference to `__bss_start__'
d:/program files (x86)/gnu tools arm embedded/4.9
2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/crt0.o:
In function `_start':
(.text+0x68): undefined reference to `__bss_end__'
d:/program files (x86)/gnu tools arm embedded/4.9
2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m\libg.a(lib_a-exit.o):
In function `exit':
exit.c:(.text.exit+0x16): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
Makefile:304: ターゲット 'kernel_cfg.timestamp' のレシピで失敗しました
make: *** [kernel_cfg.timestamp] エラー 1

/cygdrive/d/devel/TOPPERS/ASP/asp_1_9_2/OBJ
$
----

コンパイルでエラーは出ているのは、asp_stbeeが新しいバージョンに対応できていないか、コンパイラがらみの問題と思っています。これから対応予定。

又、asp_stbee_armcc-20141201.tarにcfg-mingw-static-1_9_4をコピーしてasp_proj.uvmpwでARMツールのBuldの確認を行い、こちらも動作しています。

★ CFGとCygwin,Windows10 64bitの組み合わせ問題があるのでしょうか。

別件でもう一つ困っています。
★asp_proj.uvmpwでBuildしてシミュレータ実行すると以下のエラーが発生します。

----実行ログ
Running with Code Size Limit: 32K
Load
"D:\\devel\\TOPPERS\\ASP\\asp_stbee_armcc-20141201.tar_X\\asp\\target\\stbee_armcc\\uvision\\asp.axf"

*** Restricted Version with 32768 Byte Code Size Limit
*** Currently used: 20892 Bytes (63%)

*** error 65: access violation at 0x40021000 : no 'read' permission
----

ソースコードはtarget_config.cの61行目のIOアクセスです。

/* HSIの有効化 */
sil_orw((void*)RCC_CR, CR_HSI_ON);

μVisin4はMDKCM516を使用しています。
IOアクセスが読み出せないので、シミュレータの設定が足りないのかもしれません。


久しぶりのTOPPERSです。環境を含め全てが新しくなり、困惑の真っただ中です。
よろしくお願いします。

以上
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.toppers.jp/pipermail/users/attachments/20151031/a4eada2d/attachment.html>