The appnote is pretty interesting. The source files, however, provide the "library" as an assembly file (.s43 is the extension for assembler source?), with the "increased randomness" functionality written in the fips_test.c file. Is there a C implementation file for the vlo_rand.h? I tried compiling it in a MSP430f5515 project in CCSv4, but I get the following errors at compile time:
- [E0002] Illegal mnemonic specified RNG line 0 1276096388694 2
- [E0003] Only labels and comments may begin in the first column. Make sure that the label name is not a reserved keyword. RNG line 0 1276096388679 1
- ADC10CTL0 ADC10CTL1 CM_1 REFON CCIS_1 ADC10ON ADC10SC ADC10MEM DCOCTL CCRX INCH_10 MC_2 ADC10BUSY TACTL BCSCTL1 SREF_1 ENC ADC10SHT_1 CCIFG TASSEL_2 CAP CCTLX RNG line 0 1276097430074 6
FWIW, I changed the include statements in vlo_rand.s43 and fips_test.c from "#include <msp430x22x4.h>" to "#include <msp430x551x.h>"
I think a C implementation would be more instructive/portable/maintainable/etc... Or is there a good reason for these functions being implemented in direct assembler from the point of view of the app note (i.e. secretly relies on exactly instruction counts and what not). I have to believe the F5515 is capable of implementing the app note, I probably just have to modify the .s43 file to compile, right?
Regards,
Vic
P.S. I couldn't get the unmodified appnote source files to compile in a project targetting the MSP430F233 (which it appears to have been written for according to the app note) either...
---------------------------------------- EDIT -------------------------------------------------
After *lots* of digging, I have come to find that the app note code is in IAR assembler, which is not compatible with CCSv4 assembler. Furthermore, the F5515 is significantly different architecturally than the F2xx that the appnote is targetting. Unified Clock System vs Basic Clock System being one blaring difference. I still think a port should be possible, and have been working on it, but I really would expect TI to provide implementations of the app notes that are compatible with their own IDE, and better yet would be ports for all of their chips. Any help would still be appreciated :).
---------------------------------------- EDIT -------------------------------------------------
Well, I got it to compile... remains to be seen whether I succeeded in preserving the semantic correctness. I would be happy to share my modified .asm (based on the .s43 file) for review, but I don't see a way to do that on the forum...