Skip to content

Module 'cpu' name conflict for mips_pic32mx and mips_pic32mz #8019

@cladmi

Description

@cladmi

I try to removes cases where multiple built modules have the same name.
It should not exist, and this would allow more reliable build: #7952

Right now I have issues with mips boards.

mips_pic32mx and mips_pic32mz implement the cpu module but also depend on mips32r2_common which also implements it (and then also from its periph directory).
I could say, just rename mips32r2_common from cpu to mips32r2_common but it is also, despite its _common name, a standalone cpu used by board mips-malta.

In mips_pic32mz/mx I see the following include

mips_pic32mx/eic_pic32mx.c:#include "../mips32r2_common/include/eic_irq.h"

which makes me also think that we are doing something wrong.

So my idea would be to add another cpu directory, mips32r2_malta_something_other_name and separate what is specifically a cpu, and what is in common.

From what I understood, mips32r2_common/*.c, mips32r2_common/include/eic_irq.h, mips32r2_common/periph and newlib_syscalls_mips_uhi should be in common. Some part of Makefile.include could be too.

And then, the "new" cpu would basically only have the *cpu*.h includes and its specific Makefile.include.

I have a question though on Makefile.features, right now mipc_pic32mz and mips_pic32mx do not include mips32r2_common/Makefile.features but still use its periph, so I think its a mistake.

I will propose a solution implementing what I say.

@neiljay I would be interested in help for naming convention and also in a short description for each cpu directory, I do not really understand the difference between all the cpus and why both mips32r2_common and mips_pic32_common are needed.

Metadata

Metadata

Assignees

Labels

Area: build systemArea: Build systemPlatform: MIPSPlatform: This PR/issue effects MIPS-based platformsType: cleanupThe issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions