This is a GNU make question. Maybe a simple one, but I did search some textbooks before and didn't find the answer.
Short description of what I want to do:
- copy a range of bytes from a file in a temporary file
- calculate the checksum of this file with crc32 utility
- just print the checksum in the build process for now
- delete the temporary file
The problem I see is that every command is done in a separate shell, but I need a way to get input from the previous command to execute the next one.
eg:
/opt/rtems-4.11/bin/arm-rtems4.11-nm -a px_pmc.elf | grep bsp_section_start_begin | awk '{print $$1}'
/opt/rtems-4.11/bin/arm-rtems4.11-nm -a px_pmc.elf | grep _Check_Sum | awk '{print $$1}'
These commands will print in shell the limits of the range of bytes I want, but how do I store them in two variables, say low_limit/high_limit so I can copy that range in the temp file in the next make command ?
dd if=px_pmc.bin skip=low_limit bs=(high_limit-low_limit) count=1 of=temp.bin
(in C you can do this with a simple variable, I'm looking for the equivalent here)
regards, Catalin