Commit 84f82648 authored by Andrey Filippov's avatar Andrey Filippov Committed by GitHub

Update README.md

parent 8a79971a
...@@ -8,62 +8,24 @@ and some of the required header files are generated from the Verilog code in ...@@ -8,62 +8,24 @@ and some of the required header files are generated from the Verilog code in
This is Eclipse CDT project, and the [setup sctipt](https://github.com/Elphel/elphel393) copies This is Eclipse CDT project, and the [setup sctipt](https://github.com/Elphel/elphel393) copies
project configuration (.project, .cproject, .settings) from eclipse_project_setup subdirectory. project configuration (.project, .cproject, .settings) from eclipse_project_setup subdirectory.
Eclipse should be started after Linux kernel is built with `bitbake linux-xlnx` at least once Eclipse should be started after Linux kernel is built with `bitbake linux-xlnx` at least once
so all the required files are already present. Do noit run `bitbake linux-xlnx -c clean` while so all the required files are already present. Then you may import *linux-elphel* as
the project is open in Eclipse - this command deletes all he staged files (kernel sources) and 'existing Git project' in Eclipse (you need either Eclipse for C/C++ developmentg or intall [CDT
Eclipse will reset all file filters, so .cproject file will have to be restored from plugin](https://eclipse.org/cdt/) separately.
*eclipse_project_setup*.
Do not run `bitbake linux-xlnx -c clean` while the project is open in Eclipse - this command
In Yocto project source files are staged (downloaded and optionally patched), so *clean* re-downloads will delete all he staged files (kernel sources) and Eclipse will reset all file filters, so
files and erases any of your files or changes if they were made in the source directory tree. This *.cproject* file will have to be restored from *eclipse_project_setup*.
project keeps all the modified or new files in a sparse copy of the Linux kernel tree (*src*
sub-directory) and the bitbake recepie (`bitbake linux-xlnx -c link`) adds symlinks to the actual Source files in Yocto project are staged (downloaded and optionally patched), so `-c clean` re-downloads
files and erases any of your files or changes if they were made in the source directory tree.
*linux-elphel* project keeps all the modified or new files in a sparse copy of the Linux kernel tree (*src*
sub-directory) and the bitbake recipe (`bitbake linux-xlnx -c link`) adds symlinks to the actual
project files. When the full kernel is opened in Eclipse, the base kernel files are from the staging project files. When the full kernel is opened in Eclipse, the base kernel files are from the staging
area (so will be refreshed after `-c clean`) and the project files edits will stay safe in the *src* area (so will be refreshed after `-c clean`) and the project files edits will stay safe in the *src*
subdirectory. subdirectory.
The khelper.py script izs used to generate filters for the kernel by collecting information - which The khelper.py script is used to generate filters for the kernel by collecting information - which
files where accessed during `bitbake linux-xlnx -s compile -f`, results are injected into files where accessed during `bitbake linux-xlnx -s compile -f`, results are injected into *.cproject*
configuratgion file, so any of the Linux kernel files that were not accessed during build will be marked
as excluded from build (crossed out) and not resolved by the indexer.
##Downloading
Code must be located in `poky/` directory. Navigate to `poky/` and run:
```
git clone https://github.com/Elphel/linux-elphel.git
```
##Generating links and headers
Links between project tree and kernel source tree are generated by Bitbake during 'link' task when using `meta-elphel393`. Some required header files are automatically generated during the build process.
```
. ./oe-init-build-env
bitbake linux-xlnx -c clean -f
bitbake linux-xlnx -c link -f
bitbake linux-xlnx -f
```
##Importing project into Eclipse
Run Eclipse from its location directory and provide additional heap memory to it.
```
./eclipse -vmargs -Xmx4G
```
or just edit eclipse.ini (same directory as eclipse executable) and make sure -Xmx has at least 4G
- File → Import... → General → Existing Project into Workspace
- [Next] → Select root directory → Browse → specify project location (`poky/linux-elphel/`) → [OK][Finish]
Project now is imported into Eclipse workspace.
- Project → Properties
- C/C++ General → Preprocessor Include Paths → Entries → GNU C → CDT User Settings
- [Add...] → Select "Preprocessor macros file" → `linux/include/generated/autoconf.h`[OK]
- [Add...] → Select "Preprocessor macros file" → `linux/include/linux/compiler.h`[OK]
- [Add...] → Select "Include file" → `linux/include/linux/kconfig.h`[OK]
- C/C++ General → Indexer
- Check “Enable project specific setttings”
- Check “Enable indexer”
- Uncheck “Index source files not included in the build”
- Uncheck “Index unused headers”
- Check “Index header variants”
- Uncheck “Index source and header files opened in editor”
- Uncheck “Allow heuristic resolution of includes”
- Set size of files to be skipped >100MB (effectively disabling this feature)
- Uncheck all “Skip…” options
- [OK] to close the Advanced Settings window.
- Project → C/C++ Index → Rebuild
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment