[U-Boot-Users] using a '-' in U_BOOT_CMD
Wolfgang Denk
wd at denx.de
Fri Nov 10 17:17:58 CET 2006
In message <A590D28B5042C041BCC880094CB6172E33DF14 at mail1irv.inside.istor.com> you wrote:
> I have a couple of commands that have dashes in the middle, such as
> "set-feature" and the U_BOOT_CMD macro perceives these as parse errors.
This is to be expected. '-' is not a legal character for an identifier
in C.
> I can compile by changing the "-" to an "_", but I wonder if there is a
> way to tell the U_BOOT_CMD macro when it expands ##name and #name that I
> wish it to perceive the command literally and include the dash.
Check what the macro is doing - it is constructing cmd_tbl_t type
variable names which are concatenated from the constant string
"__u_boot_cmd_" and your command name. This requires that your
command name must consist only of valid C identifier characters.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The software required `Windows 95 or better', so I installed Linux.
More information about the U-Boot
mailing list