Closed duaneellissd closed 2 years ago
You need write some script to generate .eide/eide.json
and .eide/xx.xx.options.xx.json
.eide/eide.json
is used to descript your project.eide/xx.xx.options.xx.json
used to descript your compiler optionsBut i suggest that you can use Import Project
function,
We support import IAR/MDK/Eclipse
project informations
For more details, see: https://em-ide.com/docs/getting-started/import_prj
It will not import projects from the versions of Eclipse that i use.
For example:
https://www.microsemi.com/document-portal/doc_download/137732-dg0472-running-webserver-and-tftp-server-on-smartfusion2-devices-using-iwip-and-freertos-libero-soc-v11-7-sp2-demo-guide
I don't have a Xilinx (microblaze) project handy but - i fully suspect that it will choke on that also.
And I wonder if it will work with STm32 CUBE example projects.
The issue is this: (I believe) - every chip vendor creates customized versions of eclipse, it is so customized that they project files are weird and custom thus you will have a wonderful time trying to important every possible weird thing.
This is also why tools like CMAKE cannot create projects for these solutions.
every chip vendor creates customized versions of eclipse
Every eclipse c/c++ project have .cproject
and .project
files, these files provide some compatibility
So, this plug-in will parse .cproject
and .project
to import project informations
Again, this does not work - I tried this using the MicroSemi Eclipse, I get:
a) A long list of errors and warnings (see below) b) When I try to compile - it compiles numerous files that ARE not part of the project. Example: The .cproject has a list of directories that ARE source folders and should be compiled Instead, the IDE program searches all subfolders and compiles all files that match: .c The IDE also appears to NOT* honor numerous CFLAGS specified in the .cproject Items such as: What are, and are not include directories
The directory has source code orginized into a series of subdirs. Each subdir has a "src" and/or a "include" subdirectory This includes for example: (a) a few "library like subdirectories" set of hardware drivers, and protocol handlers. (b) a "primary application" ([e: the function main()]- that uses the above "library like subdirectories" (c) a bootloader application {another 'main() function'} it uses a subset of the library like sub directories. (d)a "development board" test application [another main()] that only runs on the development board and various "library like subdirectories"
We have a different '.project' and '.cproject' for each of the above. To work on a specific project, you copy in the correct: 'pair' of ".project/.cproject" files. The key factor here is the MULITPLE apps share many of the subdirectories sort of like "code libraries" But - each application provides a unique "config.h" file to be used when building that library.
An example of this is: "FreeRTOSConfig.h" - and "lwip_opts.h" which are stored in the specific applications include folder. Thus when building application "foo" there is a "-I" path that points to the current applications include folder.
To work: "bootloader" - you copy in the bootloader ".project/.cproject" files and rebuild. To work: "uint_testapp" - copy in the testapp: .project/.cproject files and rebuild And so on for other apps
To try this out - I setup and verified that I could build and run one of the applications. Then tried to import this application, i get this "spew" from the tool I also tries to build the app (ignoring the warnings because its not clear how to resolve them)
!!! Warning !!!
There are some incompatible arguments between 'eclipse' and 'eide', you need check and add them to eide project manually !
When you have solved these incompatible problems, you need delete this note file, otherwise this file will be show again !
// ///// Target: 'Debug' ///// //
Incompatible Args: /: globalArgs:
// ///// Target: 'Release' ///// //
Incompatible Args: /: globalArgs:
[ INFO ] start building at 2022-10-28 11:03:26
MYNOTES: >> This is not the compiler that it should use, it should not have picked this one.
[ TOOL ] arm-none-eabi-gcc.exe (GNU Tools for STM32 7-2018-q2-update.20190328-1800) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
[ INFO ] file statistics (incremental compilation mode)
+---------+-----------+-----------+-----------+--------+ | C Files | Cpp Files | Asm Files | Lib Files | Totals | +---------+-----------+-----------+-----------+--------+ | 386 | 1 | 5 | 0 | 392 | +---------+-----------+-----------+-----------+--------+
>> MY NOTES: Yep, 386 source files - average size project for me. Hope you understand the scale of my issue. - Going into eclipse and selectively filtering things is very non-trivial
[ INFO ] start compilation (jobs: 12) ...
[ 0%] CC 'app_adk/src/apk_network_main.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated.
>> MY NOTES: This (app_adk) is a DEVBOARD project, this top level source directory it is not specified in the .cproject file but this file is being compiled because it matches ".c" This is a subdirectory that eclipse knows to ignore. I remove the project root folder from the src folders list, then add each sub folder that belongs to the project to the cproject (via the PATHS selection in eclipse). Thus, eclipse does not search and compile (folders) that are not listed. Thus, eclipse only compiles what it is told to compile, and not "every file that matches *.c" **
>> MY NOTES: Example...
[ 0%] CC 'app_adk/src/generated/sys_config.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 0%] CC 'app_adk/src/main.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 1%] CC 'app_adk/src/generated/sys_config_SERDESIF_3.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 1%] CC 'app_auxpie/src/generated/sys_config.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 1%] CC 'app_auxpie/src/cli_menu.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 1%] CC 'app_auxpie/src/generated/sys_config_SERDESIF_1.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 2%] CC 'app_auxpie/src/main.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 2%] CC 'app_campie/src/cli_menu.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 2%] CC 'app_campie/src/generated/sys_config.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated. [ 2%] CC 'app_campie/src/generated/sys_config_SERDESIF_1.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated.
>> MY NOTES: Finally - a directory that has source it should compile!
[ 3%] CC 'app_campie/src/main.c' arm-none-eabi-gcc.exe: warning: '-x c' after last input file has no effect arm-none-eabi-gcc.exe: fatal error: no input files compilation terminated.
ERROR compilation failed at : "c:\projects\wx_sat\wxsat\Software\BasePlatform\app_campie\src\main.c", exit code: 1
ERROR build failed !, elapsed time 0:0:0
The import tool will only import basic project information, including: source files, containing directories, macro definitions, and a few common compile parameters
If your project is complex, you will need to manually adjust the imported project to the desired state.
The plug-in also imports eclipse's exclusion list and filters files that do not need to be compiled.
Please provide the file '.cproject/.project 'so that I can find out why the exclusion list is not work.
I recognize that my project is complex, and I have numerous others just like it -that I would love to transition to vscode, however - it would be far simpler if I could create projects via a script instead.
GITHUB rejects the filenames: ".cproject" and ".project" - so Instead I renamed them to '.txt' files
NOTE: I am not using exclusion lists, I just list the directories where the source located.
(You'll see these in the
-that I would love to transition to vscode, however - it would be far simpler if I could create projects via a script instead.
Scripts can be written on their own because everyone has different needs, just generate a few files according to the rules, and you're done
https://github.com/github0null/eide/issues/181#issuecomment-1292953139
What you want to do I'd love to (1) provide a list of directories, and (2) a list of 90% of the settings for a project, then (3) just ask a few questions and (4) generate a project that can be loaded.
This is sort of like what CMAKE does, but Cmake will not work for my purposes and I thought i would try em-ide
Describe the problem Given: A list of source directories (relative paths from some place) Given: A list of include directories (again, relative paths) Given: Various compiler options to use for all targets.
For each TARGET (cpu/board) Given: A compiler (GNU [riscv and cortexM3, and Microblaze], and Keil) Given: A linker script Given: Various Compiler command line options, specific to the project
My goal is to Generate/create: a project file for each of the targets.
I specifically do not want to use a "clickity-clickity" 30 minutes with a mouse dragging and dropping and adding, and tweaking - I want to script this process of creating a project.
Expected behavior
Some script based means to create a project file
An example
This example from TI gives an example of the problem; https://github.com/lab11/cc2538-base/tree/master/foundation-firmware/1.0.1.0/driverlib/cc2538/examples There are many example applications - most of these use IAR..
In my case - I have 4 different targets, 3 using GNU tools, 1 using KEIL Looking at a simple way to create all the projects uniform ally and not via 12 different 'mouse click sessions' that are slightly different on each one.