This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] 编译器/EK-TM4C1294XL:在电路板中嵌入python解释器

Guru**** 2582155 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/601131/compiler-ek-tm4c1294xl-embedding-python-interpreter-in-the-board

部件号:EK-TM4C1294XL

工具/软件:TI C/C++编译器

我有一个python文件要在主板上运行。 因此,我想将python解释器(用C编写)嵌入到主板中。 我成功地编写了单独的C项目来运行Python文件。 它可以根据我的需要进行编译和运行。 以下是相同的makefile:-

cc=gcc
CFLAGS=-i 3.5 -i配置-i。 -c -w
LDFLAGS=-lpythesb 3.5 m -lpthread -LDL -lutil -lm -xlinker -export-dynamic -wl,-O1 -WL,-Bsymbol-functions

all:分类器培训器测试:


	$(CC)$(CFLAGS)分类


	
	


器测试:$(Cc)培训器
	$($)
	
	
;$;$(AGS);$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;$;c
	$(CC) test.o Classifier.o $(LDFLAGS)-o test

clean:
	RM -f Trainer.o Trainer Classifier.o Classifier.o
	

http://dpaste.com/3BCY2RE 是我的整个项目"hello"目录(不是示例中的目录)。  

我在我的"hello.c"中包含了"Classifier.h",我收到了以下错误: http://dpaste.com/3KKCF84

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    虽然我不知道任何详细信息,但dpaste.com显然存在一些问题。  TI不允许员工访问它。  因此我无法看到您的代码或错误消息。  

    您可以将文件附加到论坛帖子中。  单击右下角的“Use Rich Formatting (使用丰富格式)”。  将出现功能更丰富的消息编写界面。  使用回形针图标附加文件。  可接受非常有限的文件类型集。  但它包含.zip和.txt文件。  请以这种方式提交您的文件和错误消息。

    谢谢,此致,

    -George

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    第一个dpaste:- 
    。
    /Terrindict
    
    
    
    result.csv
    Predict/Terrindict Predict/Terrindict Predict/Terrindict Predict/.project ./Terrindict/libterrainclf.a
    
    ./TerrainPredict/TerrainPredict Predict/Terrdict/Terrdict Predict/Terraindict/Terraindict/Terrdict/Terraindict/Terrf.config/Terraindict/Terrf./Terrf./Terrf./Terrf.config/Terrf./Terrf./Terrain/Terrabdict/Terrain/Terrfic/Terring./Terrabdict/Terrf./Terrain/Terrf./Terrain/Terrfic/Terrfic/Terrfic/Terrain/Terrabdict/Terrain/Terrain/Terra/Terrf./Terrf./Terrfic/Terrab
    config.c.in 3.5 m 3.5 m 3.5 m
    
    
    
    
    
    
    
    
    
    
    
    python-config.py 3.5
    
    data.csv
    
    
    
    
    language.settings.xml 3.5 3.5
    
    
    
    
    abstract.h 3.5
    pycapsule.h 3.5
    pystrtod.h 3.5
    pytime.h 3.5
    errcode.h 3.5
    grammar.h 3.5
    cellobject.h 3.5
    pymacconfig.h 3.5
    moduleobject.h 3.5
    traceback.h 3.5
    memoryobject.h 3.5
    eval.h 3.5
    intrcheck.h 3.5
    accu.h 3.5
    pygetopt.h 3.5
    osdefs.h 3.5
    fileutils.h 3.5
    pyerrors.h
    3.5 Predict/pythdict/pythrac/TerrainPredict/TerrainPredict/Terrain/Terrain/Terrain/Terrain3/sysmodule.h
    
    
    
    ./TerrainPredict/Terraindict/Terrainst/Terraindict/Terrain/Terrainst/Terrain/Terrain/Terraingraminit.h
    
    
    dynamic_annotations.h
    
    
    warnings.h
    
    
    pyatomic.h
    
    
    longobject.h 3.5 3.5 3.5 3.5 3.5 3.5 3.5 marshal.h bytesobject.h 3.5 Imaging.h 3.5 Python.h 3.5 methodobject.h 3.5 ast.h 3.5 typeslots.h 3.5 py_curses.h 3.5 sliceobject.h 3.5 pythonrun.h 3.5 ucnhash.h 3.5
    iterobject.h 3.5
    setobject.h 3.5
    pyconfig.h 3.5
    modsupport.h 3.5
    node.h 3.5
    rangeobject.h 3.5
    pyport.h 3.5
    bytes_methods.h 3.5
    ceval.h 3.5
    pyctype.h 3.5
    pystrcmp.h 3.5
    dtoa.h 3.5
    dictobject.h 3.5
    bltinmodule.h 3.5
    unicodeobject.h 3.5
    structseq.h 3.5
    pylifecycle.h 3.5
    weakrefobject.h 3.5
    ImPlatform.h 3.5
    pgen.h 3.5
    object.h 3.5
    bytearrayobject.h 3.5
    patchlevel.h 3.5
    objimpl.h 3.5
    pydebug.h 3.5
    code.h 3.5
    pyarena.h 3.5
    boolobject.h 3.5
    pymacro.h 3.5
    tupleobject.h 3.5
    complexobject.h 3.5
    classobject.h 3.5
    Python-ast.h
    3.5 Predict/pythdict/pythrac/TerrainPredict/TerrainPredict/Terrain/Terrain/Terrain/Terrain3/pymath.h
    
    
    
    ./TerrainPredict/Terraindict/Terrainst/Terraindict/Terrain/Terrainst/Terrain/Terrain/Terrainodictobject.h
    
    
    asdl.h
    
    
    pystate.h
    
    
    pyhash.h
    
    
    opcode.h 3.5 3.5 3.5 3.5 3.5 3.5 3.5 datetime.h namespaceobject.h 3.5 symtable.h 3.5 enumobject.h 3.5 ImDib.h 3.5 parsetok.h 3.5 fileobject.h 3.5 funcobject.h 3.5 structmember.h 3.5 pystrhex.h 3.5 bitset.h 3.5
    token.h 3.5
    codecs.h 3.5
    pymem.h 3.5
    listobject.h 3.5
    metagrammar.h 3.5
    pyfpe.h 3.5
    frameobject.h 3.5
    pyexpat.h 3.5
    pgenheaders.h 3.5
    compile.h 3.5
    longintrepr.h 3.5
    floatobject.h 3.5
    genobject.h 3.5
    import.h 3.5
    pythread.h 3.5
    descrobject.h
    
    
    
    
    Classifier.h
    GBclfClassifier.py
    GBclfTrainer.py
    
    
    
    
    
    
    
    
    
    
    Debug /TerrainPredict/config/subdir_rules.mk
    ./Debug /TerrainPredict/config/subdir_vars./Debug/Terraindil./Debug
    .ud/Terrain.udic/Terr.Debug .mk_Prevdils./Debug.mk/Debug
    .udio/Debug.mk.d/
    Debug .mk.udio/Debug .d/
    
    
    
    
    
    
    
    
    hello_linkInfo.xml
    
    
    
    
    
    
    
    
    
    macros.ini_initial
    
    
    org.eclipse.cdt.debug.core.prefs
    
    
    
    
    
    
    
    

    第二个dpaste:-

    floor.c
    
    
    
    调用:arm编译器"/opt/ti/ccsv6/compiler/ti-trisever_fisrais6./utils/bin/armmake -k risfloor:"/opt/ti/ccsv6/tools/compiler/ti-ti
    vvvvrisfar_strais6./ti_rishere.5/bin/arm-cmrge-code_status_status=-from/from/fell-from/from/flo-from/fut-fab/fut-from/fut-fab/fut-fab/fut-from/fut-fab/fut-fut-fab/fab/fut-fut-fut-fab/fab/fut-fut-fut/fut-fut/fut-fut-fab/fut/fut-fut-fit/fab/fab/fut-fut/fut-fut-fut-fut/fut-fut-fab/fab/f 5.2 5.2 3.5 2.1 4.178 2.1 4.178 gcc --define=cs="ccs"--define=part_TM4C1294NCPDT --define=target_is_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsection=on --preproc_with_building --preproc_build=-pre-ge/reaction=from_f5 5.2
    
    
    
    
    
    编译器-fccti_m/fccti_fccp_fccp_reaction=fu/f16 -编译器-fabi_fccti_fi_fccp_fccp_fccp_reaction_fular/fi="-fi_fccp_fi="-fabi_repric/fi="-fi_repric/fi="-fabi="-fccp-fi="-fi_repric/fabi="-fccp-fi_fi_fccp-fi_fi_fi="-fabi="-fcc 5.2 include_path="/home/hell-raiser/Texas Instruments /v6/hell/TerrainPredict/config"--include_path="/home/hell-rais/Texas Instruments /v6/hell/Terrainual Predict/config"--include_path="/home/home/hlear_trab_c_tran_tran-c=12v6.cmc_rais_rais_rais/tran/tranc=德州 仪器(TI)-cc=12v-c_c_c_c=12vc_c_c_diplainc_diag-c=12v-c_diag-c_diag-c_diag-c_tran_trane-c=12v-c_diplainc_diag-c_c_diecont-c_c_c=12v-c_diplex-c_diecont-c_c_c_c_diecont-c=12v-c_diecont-c=12v-c=12v-c_c_c 3.5 2.1 4.178 2.1 4.178 3.5
    
    在编译"../hello.c"时检测到pyconfig.h 1灾难性错误的未知Multiarch位置。
    编译已终止。
    gmake:***[hello.obj]错误1
    "../startup_CCS.c",第229行:备注#1527-D:(ULP 2.1)检测到SW延迟循环使用空循环。 建议使用计时器模块代替
    "../STARTUP_CCS.c",第247行:备注#1527-D:(ULP 2.1)检测到使用空循环的SW延迟循环。 建议使用计时器模块代替
    "../STARTUP_CCS.c",第265行:备注#1527-D:(ULP 2.1)检测到使用空循环的SW延迟循环。 建议使用计时器模块来完成
    构建:../STARTUP_CCS.c
    
    构建文件:../Terraindict/Classifier.c
    调用:ARM编译器
    "/opt/ti/ccsv6/tools/compiler/ti-CGT-arm_risv6.5/bin/armcr strais" 5.2 -mv7m4-code_state=16 --flo_support=fut/ccv6/tools/pyvvvvv6./hell-cl_spell-gell/from_gell_gell_from_gell_from/from/from_gell-from/from/from_from_from/from/from/from_from_lass_lass_lass_lass_lass_lass_lass_from/from_lish_from_from_from/from_from/from/from/from_from_fics/threisfics/threisfrom_from_from_from_from_ 5.2 3.5 2.1 4.178 2.1 4.178 define=part_TM4C1294NCPDT --define=target_is_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --ual --preproc_with_pipe --predict_subscrencydefencyor="predict目录predict predict/ther/subdutrutd:ther/ther:therran/ther:therran/ther" 3.5
    
    
    
    指令:ther/therran/ther/ther:thredirector/line.d/错误:therran/ther/ther:ther/therran/line.d/ther/threpresentrutrutrutrutrutr/ther:ther/ther:ther/ther:threpresent/ther/therran/line. pyconfig.h的未知多结构位置
    1在编译"../TerrainPredict/Classifier.c"时检测到灾难性错误。
    编译已终止。
    gmake:***[TerrainPredict/Classifier.obj]错误1
    "/home/hell-raiser/Texas Instruments /v6/hell/TerrainPredict/pythreview/pyconfig.h" 3.5 ,第78行:致命错误#35:#error directive:pyconfig.h的未知Multiarch位置
    在"./Terraindictor.c"的编译中检测到灾难性错误。
    编译已终止。
    gmake:***[TerrainPredict/Trainer.obj]错误1
    "/home/hell-raiser/Texas Instruments /v6/hell/TerrainPredict/pythrac/pyconfig.h" 3.5 ,第78行:致命错误#35:#error directive:pyconfig.h的未知Multiarch位置
    在编译"./TerrainPredict/test.c"时检测到灾难性错误。
    编译终止。
    gmake:***[TerrainPredict/test.obj]错误1
    构建文件:../TerrainPredict/Trainer.c
    调用:ARM编译器
    "/opt/ti/ccsv6/tools/compiler/ti Terrisfvt-arm_raisv6.5/bin/armcl"-mv7code_status=--got_got_gell-gov/gell-gell-gov/from/from/from/from/fell-from/from/from/from/from/fut-from/from/from/from/from/fut-from/from/from/from/fut-from/from/fut-from/from/from/from/fut-from/from/fut-from/from/fut-from/fut-from/from/from/from/fut-from/fut-from/from/fut-from/from/f 5.2 5.2 3.5 2.1 4.178 2.1 4.178 define =target_is_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on --ual --predict_proc_with_compile --prescor_dependence="Terraindict_predict_predicture=225--dict_directory="obj_preainfaster/pyaindictor/faster/subdictor/faster/subdictor/faster/subdict pyainc/faster/faster/faster/fic/fic/fic/fic/fic/fic/futrent. 3.5
    
    
    
    pyconfig.h
    
    编译终止。
    gmake:***[TerrainPredict/config.obj] Error
    building Terraisv6/config_path_straisent_file:../TerrainPredict/test.c
    正在调用:5.2 3.5 编译器
    "/opt/ti/ccsv6/tools/compiler/ti-CGT-arm 5.2 m4.5/bin/armcl"-mv7"-mccode_statut_got_got_16 -from/fell/from/fell/from/fut/fell/fut/fell-fut/from/fut/fell/fut/fell-fut/fut/fut/fut/from"- 2.1 4.178 2.1 4.178 t/from/fell/fut/fut/fut/fut/fut/fell/fut/fell/fut/fut/fut/fut/fell/fut/fut/fut/fell/fut/fut/fut/fic/fut/fut/fut/fut/fut/fut/fab/f define=target_is_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_subsections=on ---ual --preproc_with_compiler --preproc_dict_dependenc="Terrainpredict_predict/predict=-fm4p_predict/fim/fim/fim=-profiler-profiler-prox_prox_prox_prox_predim_predim_predim/fi_fi_p_p_prefljb.pric/fi_fi_p_p_fi=-jm4m4p_predim_preflecut-jmcp_p_preflecut_p_preflut-jmcp_p_p_preflut_fic=-jb.jb.jb_p_p_preflecut_f_f_f_fic=-jm 5.2 5.2
    
    
    
    
    
    include_path="/home/hell-raiser/Texas Instruments /v6/hell/TerrainPredict/config"--include/hell-rais/Texas Instruments /v6/hell/Terrainconfig_pyth_home-"--include_path="/home/hell/risnsc/trad_instruments/funics/funnv_trad_c pre-from_c=12.1912万c_diag-from_trad_proc_diag-c_diecontinuel_proc -from_pre-c_diecontinuence-c_decontinuel_diag_diag_diag-c_decontinuel_pre-c_decontinuel_diag_diag-c_decontinuel_diag_diag-c_decontinuel_diag-c_decontinuel_diag_diag-c_decontinuel_diag_diag-c_decontinuel_diag-c=12 3.5 2.1 4.178 2.1 4.178
    
    
    
    /config/Terrain-raiser/Texas Instruments /v6/TivaWare_C_Serie-Raisdict 2.1。4.178 ris/examples/boards/ek-tm4c1294xl/pinout.c
    调用:ARM编译器
    "/opt/ti/ccsvsvtools/compiler/ti-cgle/ti_stancell_tools/ti_home=textrad/fell/fut-fut/fell/fell-fut/fut/fell-fut/fut/fut/fut-fut/fut/fut/fut/fut/fut-fut/fut/fut/fut/fut/fut/fut/fut/fut/futr/fell/fut/fell/fut/fell/fut/flo-fut/fut/fut/fut/fut/fut/fut/"-extrad/trad/tras_extras_extrad/trad/fut/fut/fut/fut/fab/ 5.2 5.2 3.5 2.1 4.178 2.1 4.178 gen_func_Subsections=on --ual --preproc_with _compile --preproc_dependence="drivers/pinout.d"--obj_directory="drivers""/home/hell-raiser/Texas Instruments /v6/TivaWare_C_Serie-spot-spot/favio_c_c=ctranextrab_c=1294xl/from/from/fut-from/from/fut-from/from/fut-fab/from/from/fabi/s-from/from/fut-from/from/from/fut-c/sec/from/from/from/fut-from/from/from/from/from/from/from/from/from/from/from/fab-from/fut-c/securbe.c/sec/from/from/from/fabi/securs=from/from/from/from/from/ 2.1 4.178 2.1 4.178 2.1 4.178 5.2 5.2 3.5 2.1 4.178 2.1 4.178
    
    
    
    
    建议:power ="all"-g --gcc --define=cc="ccs"--define=part_TM4C1294NCPDT --define=target_is_TM4C129_RA0 --diag_wrap=off --diag_warning=225 --display_error_number --gen_func_Dependenc=on --tras_artf_tran_trat/lines/s-traturbe/tratine.cps/hlfs/traturbe.cps/traturbs/traturbs/traturbs/traturbs/traturbe.cp/prox_trat/prox_traturs/s-prox_traturbe/prox_ine.cpuidio-in/prox_in/prox_in/prox_in/prox_ine.dio-prox_in/prox_in/prox_in/prox_in/prox_prox_in/prox_prox_in/prox_in/prox_in/prox_in 2.1 4.178 2.1 4.178 5.4
    为避免不必要的符号扩展,请对局部变量使用int大小类型,并将其转换为较小的类型以进行静态存储。
    "/home/hell-raiser/Texas Instruments/v6/TivaWare_C_Series-SW. 4.178 /utils/uartstdio.c",第878行:备注#1527-D:(ULP 2.1)使用空循环检测到2.1 延迟循环。 建议使用计时器模块代替
    "/home/hell-raiser/Texas Instruments /v6/TivaWare_C_Series-SW.Utils/uartstdio.c",第1044行:备注#1527-D:(4.178 2.1)使用空循环检测到2.1 延迟环路。 建议使用计时器模块代替
    "/home/hell-raiser/Texas Instruments /v6/TivaWare_C_Series-SW.Utils/uartstdio.c",第1139行:备注#1527-D:(4.178 2.1)使用空循环检测到2.1 延迟环路。 建议使用计时器模块代替
    "/home/hell-raiser/Texas Instruments /v6/TivaWare_C_Series-UARTvprintf.UARTs/uartstdio.c" 2.1 第134行:备注#1534-D:(ULP 7.1)检测到在一个函数"UARTvprintf"中使用全局变量"g_pcHex"。4.178 建议在函数中放置变量本地
    完成的建筑物:/home/herr-raiser/Texas Instruments /v6/TivaWare_C_Series-Art.Utils/uartstdio.c 2.1
    
    gmake:目标'all'由于错误而未重制。4.178
    
    ****构建已完成**** 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    同时看看这 一分析  ,我在确定问题方面取得了一些进展