Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

triceConfig.h 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*!
  2. * \file triceConfig.h
  3. \author Thomas.Hoehenleitner [at] seerose.net
  4. * *****************************************************************************
  5. */
  6. #ifndef TRICE_CONFIG_H_
  7. #define TRICE_CONFIG_H_
  8. #ifdef __cplusplus
  9. extern "C"
  10. {
  11. #endif
  12. //! TRICE_CLEAN, if found inside triceConfig.h, is modified by the Trice tool to silent editor warnings in the cleaned state.
  13. #define TRICE_CLEAN 0 // Do not define this at an other place! But you can delete this here.
  14. extern uint32_t ms32; //! ms32 is a 32-bit millisecond counter, counting circular in steps of 1 every ms.
  15. #include "stm32f1xx_hal.h"
  16. #define TriceStamp16 (SysTick->VAL) // Counts from 31999 -> 0 in each ms.
  17. #define TriceStamp32 ms32 // 1ms, wraps after 2^32 ms ~= 49,7 days
  18. #define TRICE_BUFFER TRICE_DOUBLE_BUFFER
  19. #define TRICE_DEFERRED_BUFFER_SIZE 2048
  20. // Windows: trice log -p jlink -args "-Device STM32F030R8" -pf none -prefix off -hs off -d16 -showID "deb:%5d" -i ../../demoTIL.json -li ../../demoLI.json
  21. // Unix: ./RTTLogUnix.sh or manually:
  22. // Terminal 1: rm ./temp/trice.bin && JLinkRTTLogger -Device STM32G0B1RE -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin
  23. // Terminal 2: touch ./temp/trice.bin && trice log -p FILE -args ./temp/trice.bin -pf none -prefix off -hs off -d16 -ts16 time:tick #%6d -i ../../demoTIL.json -li ../../demoLI.json
  24. #define TRICE_DIRECT_OUTPUT 1
  25. #define TRICE_DIRECT_SEGGER_RTT_32BIT_WRITE 1
  26. // Windows: trice log -p com4 -ts16 "time:tick #%6d" -i ../../demoTIL.json -li ../../demoLI.json
  27. // Unix: trice log -p /dev/ttyACM0 -ts16 "time:tick #%6d" -i ../../demoTIL.json -li ../../demoLI.json
  28. #define TRICE_DEFERRED_OUTPUT 1
  29. #define TRICE_DEFERRED_UARTA 1
  30. #define TRICE_UARTA USART1
  31. #define TRICE_MCU_IS_BIG_ENDIAN 0
  32. //#include "cmsis_gcc.h"
  33. #define TRICE_ENTER_CRITICAL_SECTION { uint32_t primaskstate = __get_PRIMASK(); __disable_irq(); {
  34. #define TRICE_LEAVE_CRITICAL_SECTION } __set_PRIMASK(primaskstate); }
  35. void TriceHeadLine(char *name);
  36. void LogTriceConfiguration(void);
  37. void SomeExampleTrices(int burstCount);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* TRICE_CONFIG_H_ */