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

Fix .d file creation, separate module folders #584

Closed
wants to merge 1 commit into from
Closed

Fix .d file creation, separate module folders #584

wants to merge 1 commit into from

Conversation

Kijewski
Copy link
Contributor

Right now all .c file get compiled into the same folder: $(BINDIR).
The only exception are the user modules.
This is prone to naming clashes for different modules.
A prime example is the file "config.c" in the module config.

This diff separates the .o files per $(MODULE) subfolders in $(BINDIR),
e.g.:

...
├── lpc_common.a
├── msba2_base
│   ├── board_common_init.o
│   ├── board_config.o
│   ├── board_init.o
│   ├── lpc2387-timer3.o
│   ├── msba2-cc110x.o
│   ├── msba2-ltc4150.o
│   └── msba2-uart0.o
├── msba2_base.a
├── sys
│   └── chardev_thread.o
└── sys.a

Further this patch fixes the creation of .d files. The patch enables the
creation of fresh .d files instead of using stale ones.

The patch was tested by compiling hello-world for all boards and
comparing the file sizes with and without he changes. The resulting
binaries were only tested for native.

Right now all .c file get compiled into the same folder: $(BINDIR).
The only exception are the user modules.
This is prone to naming clashes for different modules.
A prime example is the file "config.c" in the module config.

This diff separates the .o files per $(MODULE) subfolders in $(BINDIR),
e.g.:

```
...
├── lpc_common.a
├── msba2_base
│   ├── board_common_init.o
│   ├── board_config.o
│   ├── board_init.o
│   ├── lpc2387-timer3.o
│   ├── msba2-cc110x.o
│   ├── msba2-ltc4150.o
│   └── msba2-uart0.o
├── msba2_base.a
├── sys
│   └── chardev_thread.o
└── sys.a
```

Further this patch fixes the creation of .d files. The patch enables the
creation of fresh .d files instead of using stale ones.

The patch was tested by compiling hello-world for all boards and
comparing the file sizes with and without he changes. The resulting
binaries were only tested for native.
@LudwigKnuepfer
Copy link
Member

examples/default does not appear to work on an msba2 - no terminal output

@ghost ghost assigned OlegHahm Jan 30, 2014
@Kijewski
Copy link
Contributor Author

Hm, I guess I know what I did wrong. Right now it's too much work to look into, so I'll close my PR for now.

@Kijewski Kijewski closed this Jan 31, 2014
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

Successfully merging this pull request may close these issues.

None yet

3 participants