As i understand, .mbedignore must be placed in the path leading to the ignored files ie, for pwmout.h, somewhere below the mbed/ directory.
I have some concerns modifying the mbed hierarchy : I expected a local solution (ie some files in the app directory) leaving the external mbed structure untouched.
Anyway, if it’s the regular way to alter the build process, i will use it.