Hi Chris Chris Holgate wrote:
> John Dallaway wrote: > >> If you provide a new target record in pkgadd.db which matches the name >> of an existing target record in ecos.db, the packages listed in the new >> target record will be appended to the existing target record by >> ecosadmin.tcl. So you could do something like this in your pkgadd.db: >> >> target stm3210e_eval { >> packages { >> CYGPKG_IO_USB >> CYGPKG_IO_USB_SLAVE >> CYGPKG_DEVS_USB_CORTEXM_STM32 >> } >> } > > I tried this and while it works for adding in a new package, I found > that it has the unfortunate side effect of causing the entire STM3210E > target to be removed when removing the USB package. Subsequently > re-adding the USB package then just adds in this truncated target > definition which results in ecos.db becoming unloadable. The following (undocumented) incantation: ./ecosadmin.tcl --keep_targets remove CYGPKG_DEVS_USB_CORTEXM_STM32 should allow you to remove the driver package without deleting the targets which use it. Perhaps this should become the default behaviour when removing packages so that people are less likely to remove target records inadvertently. Anyway, working with ecosadmin.tcl is certainly more elegant and more scalable than adding a new target just to accommodate a new driver. > The other > changes you suggested have now gone in and should allow the USB driver > to be added to the standard target in CVS. That's great. John Dallaway