1
+ #!/usr/bin/env python3
2
+ """
3
+ Usage: python brd_msg.py <board_variant>
4
+ Example: python brd_msg.py XMC1100_Boot_Kit
5
+ """
6
+
7
+ import sys
8
+
9
+ brd_poll_links = {
10
+ "XMC1300_Boot_Kit" : "https://github.com/Infineon/XMC-for-Arduino/discussions/367" ,
11
+ "XMC1400_Arduino_Kit" : "https://github.com/Infineon/XMC-for-Arduino/discussions/366" ,
12
+ "XMC4200_Platform2GO" : "https://github.com/Infineon/XMC-for-Arduino/discussions/364" ,
13
+ "XMC4400_Platform2GO" : "https://github.com/Infineon/XMC-for-Arduino/discussions/365" ,
14
+ "XMC4700_Relax_Kit" : "https://github.com/Infineon/XMC-for-Arduino/discussions/368"
15
+ }
16
+
17
+ deprecation_candidate_boards = [
18
+ "XMC1300_Boot_Kit" ,
19
+ "XMC4200_Platform2GO" ,
20
+ "XMC4400_Platform2GO"
21
+ ]
22
+
23
+ def display_brd_msg (board_name ):
24
+
25
+ if board_name in brd_poll_links :
26
+ board_poll_link = brd_poll_links [board_name ]
27
+
28
+ if board_name in deprecation_candidate_boards :
29
+
30
+ print ("" , file = sys .stderr )
31
+ print ("=" * 62 , file = sys .stderr )
32
+ print ("==== === === === === DEPRECATION NOTICE === === === === ====" , file = sys .stderr )
33
+ print ("=" * 62 , file = sys .stderr )
34
+ print (f'The board "{ board_name } " is a candidate for' , file = sys .stderr )
35
+ print ('deprecation in the next major release of XMC-for-Arduino.' , file = sys .stderr )
36
+ print ('Please participate in our community poll until 31-08-2025:' , file = sys .stderr )
37
+ print (f'\n { board_poll_link } \n ' , file = sys .stderr )
38
+ print ('And help us decide the right level of support for this board.' , file = sys .stderr )
39
+ print ('Thanks a lot!' , file = sys .stderr )
40
+ print ("=" * 62 , file = sys .stderr )
41
+ print ("" , file = sys .stderr )
42
+
43
+ else :
44
+
45
+ print ("" , file = sys .stderr )
46
+ print ("=" * 62 , file = sys .stderr )
47
+ print ("==== === === === === BOARD USAGE SURVEY === === === === ====" , file = sys .stderr )
48
+ print ("=" * 62 , file = sys .stderr )
49
+ print ('We would be very grateful if you could take a moment to' , file = sys .stderr )
50
+ print ('participate in our community poll about the usage' , file = sys .stderr )
51
+ print (f'of the board "{ board_name } ".' , file = sys .stderr )
52
+ print ('The poll is open until 31-08-2025:' , file = sys .stderr )
53
+ print (f'\n { board_poll_link } \n ' , file = sys .stderr )
54
+ print ('Your feedback is crucial to help us provide the right level' , file = sys .stderr )
55
+ print ('of support for this board.' , file = sys .stderr )
56
+ print ('Thanks a lot!' , file = sys .stderr )
57
+ print ("=" * 62 , file = sys .stderr )
58
+ print ("" , file = sys .stderr )
59
+
60
+
61
+ def main ():
62
+
63
+ if len (sys .argv ) < 2 :
64
+ print ("ERROR: No board name provided!" )
65
+ return 1
66
+
67
+ board_name = sys .argv [1 ]
68
+
69
+ display_brd_msg (board_name )
70
+
71
+
72
+ if __name__ == "__main__" :
73
+ main ()
0 commit comments