Dear Sir,
I like to use the single cycle multily capability of LPC4370 M4 core, can you advise what should I do speicifically for this ? in code or in compiler ?
Best Regards,
Hi Con Verse,
THanks for the reply. I am first time with Cortex M4 and LPC4370, could you advise following clarification
1. Do I need to define FPU exitence or include certain h file before compilier can automatically generate the correct single cycle multiplt istruction
2. Is there any way I can verify the compiled assembly code, I am useing MCUExpresso
3. Have you use the FPU before, what's the processor you use ?
THansk for help !
1. Single cycle multiply (integer) is nothing to do with FPU (floating point). No, you don't need to do anything. Just write your code.
2. What, don't you trust the compiler? You can generate assembly output if you want to see what is generated. See https://mcuoneclipse.com/2018/07/08/creatin…
3. Yes, I use FPU. DOn't forget it is single precision (32-bit, or 'float' in C). If you use double precision in your code ('double' in C), then it is emulated, so it will be slow. Take a look at this https://mcuoneclipse.com/2018/07/08/creatin…
Also, make sure you read section 19.4 (Floating point support) in the latest MCUXpresso IDE User Guide.
Sorry about that.
Generating assembly output from the compiler
Creating Disassembly Listings with GNU Tools and Eclipse | MCU on Eclipse
Floating point:
Be aware: Floating Point Operations on ARM Cortex-M4F | MCU on Eclipse
Hi, Chen,
If you would like to get single cycle multiply operation, I suppose that you can use the assembly language to finish the job in order to maximize the effiency. I attach the Cortex-M4 generic user guide, which includes the assembly instruction of the core. You can develop project in C language, you can declare an api function and implement the body of the api function with assembly language, there is calling convention for api function based compiler, but it is compiler by compiler.
Hope it can help you
BR
XiangJun Rong