ISSDK  1.8
IoT Sensing Software Development Kit
freemaster_cfg.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007-2015 Freescale Semiconductor, Inc.
3  * Copyright 2018-2019 NXP
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * FreeMASTER Communication Driver - User Configuration File
8  */
9 
10 #ifndef __FREEMASTER_CFG_H
11 #define __FREEMASTER_CFG_H
12 
13 ////////////////////////////////////////////////////////////////////////////////
14 // Definitions
15 ////////////////////////////////////////////////////////////////////////////////
16 
17 #define FMSTR_PLATFORM_CORTEX_M 1 /* Cortex-M platform (see freemaster.h for list of all supported platforms) */
18 
19 //! Set the demo configuration
20 #define FMSTR_DEMO_ENOUGH_ROM 1 /* Platform has enough ROM to show most of the FreeMASTER features */
21 #define FMSTR_DEMO_LARGE_ROM 1 /* Platform has large ROM enough to store the extended data structures used in FreeMASTER demo */
22 #define FMSTR_DEMO_SUPPORT_I64 1 /* support for long long type */
23 #define FMSTR_DEMO_SUPPORT_FLT 1 /* support for float type */
24 #define FMSTR_DEMO_SUPPORT_DBL 1 /* support for double type */
25 
26 
27 //! Enable/Disable FreeMASTER functionalities
28 #define FMSTR_DISABLE 0 //!< To disable all FreeMASTER functionalities
29 
30 //! Select interrupt or poll-driven serial communication
31 #define FMSTR_LONG_INTR 0 //!< Complete message processing in interrupt
32 #define FMSTR_SHORT_INTR 1 //!< Queuing done in interrupt
33 #define FMSTR_POLL_DRIVEN 0 //!< No interrupt needed, polling only
34 
35 //! Select communication interface
36 
37 //! List of implemented standard FreeMASTER transports and its drivers
38 //!< FMSTR_SERIAL - Standard serial transport protocol (Used by various types of UART peripherals as USB CDC implementation)
39 //!< FMSTR_SERIAL_MCUX_UART - MCUXSDK driver for UART peripheral
40 //!< FMSTR_SERIAL_MCUX_LPUART - MCUXSDK driver for LPUART peripheral
41 //!< FMSTR_SERIAL_MCUX_USART - MCUXSDK driver for USART peripheral
42 //!< FMSTR_SERIAL_MCUX_MINIUSART -MCUXSDK driver for MINIUSART peripheral
43 //!< FMSTR_SERIAL_MCUX_USB - MCUXSDK driver for USB peripheral with CDC class
44 //!< FMSTR_CAN - Standard CAN transport protocol (Used by various types of CAN peripherals)
45 //!< FMSTR_CAN_MCUX_FLEXCAN - MCUXSDK driver for FlexCAN peripheral
46 //!< FMSTR_CAN_MCUX_MCAN - MCUXSDK driver for MCAN peripheral
47 //!< FMSTR_CAN_MCUX_MSCAN - MCUXSDK driver for msCAN peripheral
48 //!< FMSTR_PDBDM - Packet Driven BDM (Background debug memory access using JTAG, SWD or BDM debug probes). This transport does not use low-level driver.
49 
50 #define FMSTR_TRANSPORT FMSTR_SERIAL //!< Use serial transport layer */
51 #define FMSTR_SERIAL_DRV FMSTR_SERIAL_MCUX_UART //!< Use serial driver for UART */
52 
53 //! Define communication interface base address or leave undefined for runtime setting
54 // #undef FMSTR_SERIAL_BASE //!< Serial base will be assigned in runtime (when FMSTR_USE_UART)
55 // #undef FMSTR_CAN_BASE //!< CAN base will be assigned in runtime (when FMSTR_USE_FLEXCAN)
56 
57 //! FlexCAN-specific, communication message buffers
58 #define FMSTR_FLEXCAN_TXMB 0
59 #define FMSTR_FLEXCAN_RXMB 1
60 
61 //! Input/output communication buffer size
62 #define FMSTR_COMM_BUFFER_SIZE 0 //!< Set to 0 for "automatic"
63 
64 //! Receive FIFO queue size (use with FMSTR_SHORT_INTR only)
65 #define FMSTR_COMM_RQUEUE_SIZE 32 //!< Set to 0 for "default"
66 
67 //! Support for Application Commands
68 #define FMSTR_USE_APPCMD 1 //!< Enable/disable App.Commands support
69 #define FMSTR_APPCMD_BUFF_SIZE 32 //!< App.Command data buffer size
70 #define FMSTR_MAX_APPCMD_CALLS 4 //!< How many app.cmd callbacks? (0=disable)
71 
72 //! Oscilloscope support
73 #define FMSTR_USE_SCOPE 2 //!< Specify number of supported oscilloscopes
74 #define FMSTR_MAX_SCOPE_VARS 8 //!< Specify maximum number of scope variables per one oscilloscope
75 
76 //! Recorder support
77 #define FMSTR_USE_RECORDER 2 //!< Specify number of supported recorders
78 
79 //! Built-in recorder buffer
80 #define FMSTR_REC_BUFF_SIZE 1024 //!< Built-in buffer size. Set to zero to disable using embedded buffer for recorder 0.
81 
82 //! Recorder time base, specifies how often the recorder is called in the user app.
83 #define FMSTR_REC_TIMEBASE FMSTR_REC_BASE_MILLISEC(0) //!< 0 = "unknown"
84 #define FMSTR_REC_FLOAT_TRIG 1 //!< Enable/disable floating point triggering
85 
86 //!< Target-side address translation (TSA)
87 #define FMSTR_USE_TSA 1 //!< Enable TSA functionality
88 #define FMSTR_USE_TSA_INROM 1 //!< TSA tables declared as const (put to ROM)
89 #define FMSTR_USE_TSA_SAFETY 1 //!< Enable/Disable TSA memory protection
90 #define FMSTR_USE_TSA_DYNAMIC 1 //!< Enable/Disable TSA entries to be added also in runtime
91 
92 //!< Pipes as data streaming over FreeMASTER protocol
93 #define FMSTR_USE_PIPES 3 //!< Specify number of supported pipe objects
94 
95 //!< Enable/Disable read/write memory commands
96 #define FMSTR_USE_READMEM 1 //!< Enable read memory commands
97 #define FMSTR_USE_WRITEMEM 1 //!< Enable write memory commands
98 #define FMSTR_USE_WRITEMEMMASK 1 //!< Enable write memory bits commands
99 
100 // Define password for access levels to protect them. AVOID SHORT PASSWORDS in production version.
101 // Passwords should be at least 20 characters long to prevent dictionary attacks.
102 // #define FMSTR_RESTRICTED_ACCESS_RWF_PASSWORD "rwf"
103 // #define FMSTR_RESTRICTED_ACCESS_RW_PASSWORD "rw"
104 // #define FMSTR_RESTRICTED_ACCESS_R_PASSWORD "r"
105 
106 // Storing cleartext passwords in Flash memory is not safe, consider storing their SHA1 hash instead
107 // Even with this option, the hash must be generated from reasonably complex password to prevent dictionary attack.
108 #define FMSTR_USE_HASHED_PASSWORDS 0 //!< When non-zero, the passwords above are specified as a pointer to 20-byte SHA1 hash of password text
109 
110 //#define FMSTR_DEBUG_TX 1
111 
112 #endif /* __FREEMASTER_CFG_H */
113 
114 ////////////////////////////////////////////////////////////////////////////////
115 // EOF
116 ////////////////////////////////////////////////////////////////////////////////